Documentation ¶
Index ¶
- Constants
- func ConfigZap(serverName string, runConf *RunningConfig) zap.Config
- func NewZapLogger(config zap.Config) *zap.Logger
- type Level
- type LogLevel
- type RunMode
- type RunningConfig
- type ZapLogger
- func (l ZapLogger) Debug(module string, data interface{})
- func (l ZapLogger) Error(module string, data interface{})
- func (l ZapLogger) Fatal(module string, data interface{})
- func (l ZapLogger) Info(module string, data interface{})
- func (l ZapLogger) Panic(module string, data interface{})
- func (l ZapLogger) Warn(module string, data interface{})
Constants ¶
View Source
const LevelFlagHelp = "Log level, default is info. One of: [debug, info, warn, error]"
View Source
const LevelFlagName = "log.level"
View Source
const LogMaxBackupsFlagHelp = "The maximum number of old log files to retain. Default is 5."
View Source
const LogMaxBackupsFlagName = "log.max-backups"
View Source
const LogMaxDaysFlagHelp = "The maximum number of days to retain old log files. Default is 30"
View Source
const LogMaxDaysFlagName = "log.max-days"
View Source
const RunModeFlagHelp = "Running Mode,default is release. One of: [dev, debug, release]"
View Source
const RunModeFlagName = "running.mode"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RunningConfig ¶
func NewRunConf ¶
func NewRunConf(level, mode string, maxdays, maxbackups int) *RunningConfig
type ZapLogger ¶
type ZapLogger struct {
*zap.SugaredLogger
}
func NewZapSugarLogger ¶
func NewZapSugarLoggerGin ¶
Click to show internal directories.
Click to hide internal directories.