Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
NopLogger *zap.Logger
)
Functions ¶
func InitLogSystem ¶
func InitLogSystem(cfg *Config) (logger *zap.Logger, level zap.AtomicLevel)
InitLogSystem with configuration
Types ¶
type Config ¶
type Config struct { // Filename is the file to write logs to Filename string // MaxSize is the maximum size in megabytes for a single log file MaxSize int // MaxAge is the maximum number of days to retain old log files MaxAge int // MaxBackups is the maximum number of log files to retain MaxBackups int // LocalTime determines if the time used for formatting timestamp of the backup files LocalTime bool // Compress determines if the rotated log files should be compress using gzip Compress bool }
Config for log system
Click to show internal directories.
Click to hide internal directories.