Documentation ¶
Index ¶
- func ConfigureFileLogger(config *Config) *lumberjack.Logger
- func Debug(msg string)
- func Debugf(tmpl string, args ...interface{})
- func Error(msg string)
- func Errorf(tmpl string, args ...interface{})
- func Info(msg string)
- func Infof(tmpl string, args ...interface{})
- func Print(msg string)
- func Printf(tmpl string, args ...interface{})
- func Sync()
- func Verbose() bool
- func Warn(msg string)
- func Warnf(tmpl string, args ...interface{})
- type Config
- type FileConfig
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureFileLogger ¶
func ConfigureFileLogger(config *Config) *lumberjack.Logger
Types ¶
type Config ¶
type Config struct { Level string `json:"level" yaml:"level"` Console bool `json:"console" yaml:"console"` FileConfig `json:"fileConfig" yaml:"fileConfig"` }
func DefaultConfig ¶
func DefaultConfig() *Config
type FileConfig ¶
type FileConfig struct { Filename string `json:"fileName" yaml:"fileName"` MaxSize int `json:"maxSize" yaml:"maxSize"` MaxAge int `json:"maxAge" yaml:"maxAge"` MaxBackups int `json:"maxBackups" yaml:"maxBackups"` LocalTime bool `json:"localTime" yaml:"localTime"` Compress bool `json:"compress" yaml:"compress"` }
type Logger ¶
type Logger interface { Sync() Verbose() bool Debug(msg string) Debugf(tmpl string, args ...interface{}) Info(msg string) Infof(tmpl string, args ...interface{}) Warn(msg string) Warnf(tmpl string, args ...interface{}) Error(msg string) Errorf(tmpl string, args ...interface{}) Print(msg string) Printf(tmpl string, v ...interface{}) L() Logger }
func NewZapFromConfig ¶
func NewZeroFromConfig ¶
Click to show internal directories.
Click to hide internal directories.