Documentation ¶
Index ¶
- func Debug(a ...interface{})
- func Debugf(format string, a ...interface{})
- func Error(a ...interface{})
- func Errorf(format string, a ...interface{})
- func Fatal(a ...interface{})
- func Fatalf(format string, a ...interface{})
- func GetLogger() utils.Logger
- func Info(a ...interface{})
- func Infof(format string, a ...interface{})
- func NewLogger(opts ...Option) *defaultLogger
- func NewWriter(opts WriterOptions) (io.Writer, error)
- func Panic(a ...interface{})
- func Panicf(format string, a ...interface{})
- func SetLogger(logger utils.Logger)
- func Warn(a ...interface{})
- func Warnf(format string, a ...interface{})
- type CutRule
- type Entity
- type EntityPool
- type Format
- type Level
- type LoggerConfigChangeListener
- type Option
- func WithCallerFullPath(enable bool) Option
- func WithCallerSkip(skip int) Option
- func WithClassifiedStorage(enable bool) Option
- func WithFile(file string) Option
- func WithFileCutRule(cutRule utils.CutRule) Option
- func WithFileMaxAge(maxAge time.Duration) Option
- func WithFileMaxSize(size int64) Option
- func WithFormat(format utils.Format) Option
- func WithLevel(level utils.Level) Option
- func WithStackLevel(level utils.Level) Option
- func WithStdout(enable bool) Option
- func WithTimeFormat(format string) Option
- type WriterOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Entity ¶
type EntityPool ¶
type EntityPool struct {
// contains filtered or unexported fields
}
type LoggerConfigChangeListener ¶ added in v0.0.23
type LoggerConfigChangeListener struct {
// contains filtered or unexported fields
}
type Option ¶
type Option func(o *options)
func WithCallerFullPath ¶
WithCallerFullPath 设置是否启用调用文件全路径
func WithClassifiedStorage ¶
WithClassifiedStorage 设置启用文件分级存储 启用后,日志将进行分级存储,大一级的日志将存储于小于等于自身的日志级别文件中 例如:InfoLevel级的日志将存储于due.debug.20220910.log、due.info.20220910.log两个日志文件中
Source Files ¶
Click to show internal directories.
Click to hide internal directories.