Documentation ¶
Index ¶
- func Debug(msg string, fields ...LogField)
- func Error(err error, fields ...LogField)
- func Errorf(msg string, err interface{}, fields ...LogField)
- func Fatal(msg string, fields ...LogField)
- func Info(msg string, fields ...LogField)
- func InitLog(c LogConfig)
- func Panic(msg error, fields ...LogField)
- func Warn(msg string, fields ...LogField)
- type LogConfig
- type LogFactory
- type LogField
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LogConfig ¶
type LogConfig struct { Type string `value:"type"` Path string `value:"path"` Level string `value:"level"` Stack bool `value:"stack"` MaxAge int `value:"max_age"` }
LogConfig 日志配置文件
type LogFactory ¶
type LogFactory struct {
Cfg LogConfig `value:"logger"`
}
func NewLogFactory ¶
func NewLogFactory() *LogFactory
func (*LogFactory) InitLog ¶
func (l *LogFactory) InitLog()
Click to show internal directories.
Click to hide internal directories.