mirror of
				https://github.com/openimsdk/open-im-server.git
				synced 2025-11-04 03:13:15 +08:00 
			
		
		
		
	* feat: add test format Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * fix: fix github auto gh pr Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: add build Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * build: add build copyright admin Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * docs: design documentation and deployment devops flow Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: add docker file and version appoint Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: add go release Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: add go release Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: add go release Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: add go release Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: add go release Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> feat: add go release Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> feat: add go release Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: set pull request Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: set pull request Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: set pull request Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> * feat: set pull request Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> --------- Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
		
			
				
	
	
	
		
			1.4 KiB
		
	
	
	
	
	
	
	
			
		
		
	
	
			1.4 KiB
		
	
	
	
	
	
	
	
Log Standards
Log Standards
- The unified log package 
github.com/OpenIMSDK/Open-IM-Server/internal/pkg/logshould be used for all logging; - Use structured logging formats: 
log.Infow,log.Warnw,log.Errorw, etc. For example:log.Infow("Update post function called"); - All logs should start with an uppercase letter and should not end with a 
.. For example:log.Infow("Update post function called"); - Use past tense. For example, use 
Could not delete Binstead ofCannot delete B; - Adhere to log level standards:
- Debug level logs use 
log.Debugw; - Info level logs use 
log.Infow; - Warning level logs use 
log.Warnw; - Error level logs use 
log.Errorw; - Panic level logs use 
log.Panicw; - Fatal level logs use 
log.Fatalw. 
 - Debug level logs use 
 - Log settings:
- Development and test environments: The log level is set to 
debug, the log format can be set toconsole/jsonas needed, and caller is enabled; - Production environment: The log level is set to 
info, the log format is set tojson, and caller is enabled. (Note: In the early stages of going online, to facilitate troubleshooting, the log level can be set todebug) 
 - Development and test environments: The log level is set to 
 - When logging, avoid outputting sensitive information, such as passwords, keys, etc.
 - If you are calling a logging function in a function/method with a 
context.Contextparameter, it is recommended to uselog.L(ctx).Infow()for logging.