Documentation ¶
Overview ¶
Package zaplog uses the zap logging library for application logs. There are two logging modes, development and production. The production mode saves the logs to file and automatically rotates older files. While the development mode prints all feedback to stdout.
Index ¶
Constants ¶
View Source
const ( // ServerLog is the filename of the Error, Panic and Fatal level log. ServerLog = "defacto2_server_panics.log" // InfoLog is the filename of the Warn and Info level log. InfoLog = "defacto2_server_info.log" // MaxSizeMB is the maximum file size in megabytes before a log rotation is triggered. MaxSizeMB = 100 // MaxBackups is the maximum number of rotated logs to keep, older logs are deleted. MaxBackups = 5 // MaxDays is the maximum days a log is kept before a log rotation. MaxDays = 45 )
Variables ¶
This section is empty.
Functions ¶
func Store ¶
Store logger prints all info and higher log levels to files using the encoder. Either the zaplog.JSON, zaplog.Text, or zaplog.TextNoTime encoders can be used. Fatal and Panics are also returned to os.Stderr.
func TextNoTime ¶ added in v1.5.7
TextNoTime returns a logger in color but without the time.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.