Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultLogger = new(noop)
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger interface { // SetLevel modify logger level. SetLevel(l Level) // IsDebugEnabled return True if this Logger is enabled for the Debug level, false otherwise. IsDebugEnabled() bool // Debug formats using the default formats for its operands and logs a message at Debug level. Debug(args ...interface{}) // Debugf formats according to a format specifier and log a templated message at Debug level. Debugf(template string, args ...interface{}) // IsInfoEnabled return True if this Logger is enabled for the Info level, false otherwise. IsInfoEnabled() bool // Info formats using the default formats for its operands and logs a message at Info level. Info(args ...interface{}) // Infof formats according to a format specifier and log a templated message at Info level. Infof(template string, args ...interface{}) // IsWarnEnabled return True if this Logger is enabled for the Warn level, false otherwise. IsWarnEnabled() bool // Warn formats using the default formats for its operands and logs a message at Warn level. Warn(args ...interface{}) // Warnf formats according to a format specifier and log a templated message at Warn level. Warnf(template string, args ...interface{}) // IsErrorEnabled return True if this Logger is enabled for the Error level, false otherwise. IsErrorEnabled() bool // Error formats using the default formats for its operands and logs a message at Error level. Error(args ...interface{}) // Errorf formats according to a format specifier and log a templated message at Error level. Errorf(template string, args ...interface{}) // WithTrace add trace id to the logging context. WithTrace(traceID string) // With adds a variadic number of fields to the logging context. It accepts // loosely-typed key-value pairs. When processing pairs, the first element // of the pair is used as the field key and the second as the field value. With(args ...interface{}) // Sync flushes any buffered log entries. Sync() error }
Click to show internal directories.
Click to hide internal directories.