Documentation
¶
Index ¶
Constants ¶
View Source
const ( OptionCallerSkip = "caller-skip" OptionWithPrefix = "with-prefix" )
Variables ¶
View Source
var LogColorMap = map[LogLevel]Color{ LogLevelError: LogColorRed, LogLevelWarn: LogColorYellow, LogLevelInfo: LogColorCyan, LogLevelDebug: LogColorWhite, }
Functions ¶
This section is empty.
Types ¶
type ILogger ¶
type ILogger interface {
Debug(args ...interface{})
Debugf(format string, args ...interface{})
DebugW(message string, keysAndValues ...interface{})
DebugS(message string, fields LogField)
Info(args ...interface{})
Infof(format string, args ...interface{})
InfoW(message string, keysAndValues ...interface{})
InfoS(message string, fields LogField)
Warn(args ...interface{})
Warnf(format string, args ...interface{})
WarnW(message string, keysAndValues ...interface{})
WarnS(message string, fields LogField)
Error(args ...interface{})
Errorf(format string, args ...interface{})
ErrorW(message string, keysAndValues ...interface{})
ErrorS(message string, fields LogField)
WithPrefix(prefix string) ILogger
SetLogLevel(level LogLevel)
WithOptions(opts ...Option) ILogger // new api, can replace WithPrefix and SetLogLevel in the future
}
type LogMessage ¶
Click to show internal directories.
Click to hide internal directories.