Documentation ¶
Index ¶
- func Serve(strategy Strategy) (err error)
- func SetupStrategyFromConfig(strategy Strategy) (err error)
- type MyLogger
- func (l *MyLogger) Debug(args ...interface{})
- func (l *MyLogger) Debugf(template string, args ...interface{})
- func (l *MyLogger) Debugw(msg string, keysAndValues ...interface{})
- func (l *MyLogger) Error(args ...interface{})
- func (l *MyLogger) Errorf(template string, args ...interface{})
- func (l *MyLogger) Errorw(msg string, keysAndValues ...interface{})
- func (l *MyLogger) Info(args ...interface{})
- func (l *MyLogger) Infof(template string, args ...interface{})
- func (l *MyLogger) Infow(msg string, keysAndValues ...interface{})
- func (l *MyLogger) Sync()
- func (l *MyLogger) Warn(args ...interface{})
- func (l *MyLogger) Warnf(template string, args ...interface{})
- func (l *MyLogger) Warnw(msg string, keysAndValues ...interface{})
- type SConfig
- type SExchange
- type SLog
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupStrategyFromConfig ¶
func SetupStrategyFromConfig(strategy Strategy) (err error)
SetupStrategyFromConfig 根据配置文件设置策略参数
Types ¶
type MyLogger ¶ added in v1.1.10
type MyLogger struct { Path string // 文件路径,如:./app.log Level string // 日志输出的级别 MaxFileSize int // 日志文件大小的最大值,单位(M) MaxBackups int // 最多保留备份数 MaxAge int // 日志文件保存的时间,单位(天) Compress bool // 是否压缩 Caller bool // 日志是否需要显示调用位置 JsonFormat bool // 是否以Json格式输出 Stdout bool // 是否输出到控制台 // contains filtered or unexported fields }
func NewMyLogger ¶ added in v1.1.10
Click to show internal directories.
Click to hide internal directories.