Documentation ¶
Index ¶
- Variables
- func Debug(v ...interface{})
- func Debugf(format string, v ...interface{})
- func Error(v ...interface{})
- func Errorf(format string, v ...interface{})
- func Fatal(v ...interface{})
- func Fatalf(format string, v ...interface{})
- func Info(v ...interface{})
- func Infof(format string, v ...interface{})
- func Trace(v ...interface{})
- func Tracef(format string, v ...interface{})
- func Warn(v ...interface{})
- func Warnf(format string, v ...interface{})
- type FdWriter
- type Logger
- func (l *Logger) Debug(v ...interface{})
- func (l *Logger) Debugf(format string, v ...interface{})
- func (l *Logger) Error(v ...interface{})
- func (l *Logger) Errorf(format string, v ...interface{})
- func (l *Logger) Fatal(v ...interface{})
- func (l *Logger) Fatalf(format string, v ...interface{})
- func (l *Logger) Info(v ...interface{})
- func (l *Logger) Infof(format string, v ...interface{})
- func (l *Logger) IsDebug() bool
- func (l *Logger) IsQuiet() bool
- func (l *Logger) NoQuiet() *Logger
- func (l *Logger) Output(depth int, prefix Prefix, data string) error
- func (l *Logger) Quiet() *Logger
- func (l *Logger) SetLogLevel(level log.LogLevel)
- func (l *Logger) SetOutput(w io.Writer)
- func (l *Logger) Trace(v ...interface{})
- func (l *Logger) Tracef(format string, v ...interface{})
- func (l *Logger) Warn(v ...interface{})
- func (l *Logger) Warnf(format string, v ...interface{})
- func (l *Logger) WithColor() *Logger
- func (l *Logger) WithDebug() *Logger
- func (l *Logger) WithTimestamp() *Logger
- func (l *Logger) WithoutColor() *Logger
- func (l *Logger) WithoutDebug() *Logger
- func (l *Logger) WithoutTimestamp() *Logger
- type Prefix
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Fatal 前缀 FatalPrefix = Prefix{ Plain: plainFatal, Color: color.Red(plainFatal), File: true, } // Error 前缀 ErrorPrefix = Prefix{ Plain: plainError, Color: color.Red(plainError), File: true, } // Warn 前缀 WarnPrefix = Prefix{ Plain: plainWarn, Color: color.Orange(plainWarn), } // Info 前缀 InfoPrefix = Prefix{ Plain: plainInfo, Color: color.Green(plainInfo), } // Debug 前缀 DebugPrefix = Prefix{ Plain: plainDebug, Color: color.Purple(plainDebug), File: true, } // Trace 前缀 TracePrefix = Prefix{ Plain: plainTrace, Color: color.Cyan(plainTrace), } )
Functions ¶
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger 日志的底层存储
func (*Logger) WithoutTimestamp ¶
WithoutTimestamp 关闭时间戳输出
Click to show internal directories.
Click to hide internal directories.