Documentation
¶
Index ¶
- type Logger
- func (l *Logger) Close() (err error)
- func (l *Logger) Debug(a ...interface{})
- func (l *Logger) Debugf(format string, a ...interface{})
- func (l *Logger) Error(a ...interface{})
- func (l *Logger) Errorf(format string, a ...interface{})
- func (l *Logger) Fatal(a ...interface{})
- func (l *Logger) Fatalf(format string, a ...interface{})
- func (l *Logger) Info(a ...interface{})
- func (l *Logger) Infof(format string, a ...interface{})
- func (l *Logger) Panic(a ...interface{})
- func (l *Logger) Panicf(format string, a ...interface{})
- func (l *Logger) Print(level glog.Level, a ...interface{})
- func (l *Logger) Printf(level glog.Level, format string, a ...interface{})
- func (l *Logger) Warn(a ...interface{})
- func (l *Logger) Warnf(format string, a ...interface{})
- 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 glog.CutRule) Option
- func WithFileMaxAge(maxAge time.Duration) Option
- func WithFileMaxSize(size int64) Option
- func WithFormat(format glog.Format) Option
- func WithLevel(level glog.Level) Option
- func WithStackLevel(level glog.Level) Option
- func WithStdout(enable bool) Option
- func WithTimeFormat(format string) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
type Option ¶
type Option func(o *options)
func WithCallerFullPath ¶
WithCallerFullPath 设置是否启用调用文件全路径
func WithClassifiedStorage ¶
WithClassifiedStorage 设置启用文件分级存储 启用后,日志将进行分级存储,大一级的日志将存储于小于等于自身的日志级别文件中 例如:InfoLevel级的日志将存储于gcore.debug.20220910.log、gcore.info.20220910.log两个日志文件中
Click to show internal directories.
Click to hide internal directories.