Documentation ¶
Index ¶
- Variables
- func Debug(fields Fields, message string)
- func Debugf(fields string, message ...interface{})
- func Error(fields Fields, message string)
- func Errorf(fields string, message ...interface{})
- func Info(fields Fields, message string)
- func Infof(fields string, message ...interface{})
- func IoWriter() io.Writer
- func Production(opts ...Option)
- func Sync() error
- func Warn(fields Fields, message string)
- func Warnf(fields string, message ...interface{})
- func WithErr(err error, message string)
- type Fields
- type ILogger
- type Level
- type Logger
- func (f *Logger) Debug(fields Fields, message string)
- func (f *Logger) Debugf(format string, message ...interface{})
- func (f *Logger) Error(fields Fields, message string)
- func (f *Logger) Errorf(format string, message ...interface{})
- func (f *Logger) Info(fields Fields, message string)
- func (f *Logger) Infof(format string, message ...interface{})
- func (f *Logger) IoWriter() io.Writer
- func (f *Logger) Sync() error
- func (f *Logger) Warn(fields Fields, message string)
- func (f *Logger) Warnf(format string, message ...interface{})
- func (f *Logger) WithErr(err error, message string)
- type Option
- type Options
- type OutputOption
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultLogger = newDefaultLogger()
Functions ¶
Types ¶
type Option ¶
type Option func(c *Options)
func AddCallerSkip ¶ added in v2.0.2
func WithErrorRotate ¶ added in v2.0.2
WithErrorRotate 是否使用滚动日志 size 最大size,默认1M day 最长保留天数 maxBackup 最多保留日志文件数量 file 文件路径
func WithOutputOption ¶
func WithOutputOption(f OutputOption) Option
func WithRotate ¶ added in v2.0.2
WithRotate 是否使用滚动日志 size 最大size,默认1M day 最长保留天数 maxBackup 最多保留日志文件数量 file 文件路径
Click to show internal directories.
Click to hide internal directories.