Documentation ¶
Index ¶
- func Dataf(format string, v ...interface{})
- func Debug(v ...interface{})
- func Debugf(format string, v ...interface{})
- func Error(v ...interface{})
- func Errorf(format string, v ...interface{})
- func Fatal(v ...interface{})
- func Fatalf(format string, v ...interface{})
- func Info(v ...interface{})
- func Infof(format string, v ...interface{})
- func Init(conf *Config)
- func InitData(conf *Config)
- func Warn(v ...interface{})
- func Warnf(format string, v ...interface{})
- type Config
- type FileConfig
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Writer string `toml:"writer"` Level string `toml:"level"` FileConfig FileConfig `toml:"file_config"` }
Config 日志配置项 Writer 可配置为 file; console; file,console
type FileConfig ¶
type FileConfig struct { Path string `toml:"path"` Compress bool `toml:"compress"` MaxSize int `toml:"max_size"` MaxAge int `toml:"max_age"` MaxBackups int `toml:"max_backups"` }
FileConfig 日志配置项 文件类型时需要配置
type Logger ¶
type Logger interface { Debug(v ...interface{}) Info(v ...interface{}) Warn(v ...interface{}) Error(v ...interface{}) Fatal(v ...interface{}) Debugf(format string, v ...interface{}) Infof(format string, v ...interface{}) Warnf(format string, v ...interface{}) Errorf(format string, v ...interface{}) Fatalf(format string, v ...interface{}) }
Logger 日志接口
Click to show internal directories.
Click to hide internal directories.