Documentation
¶
Index ¶
Constants ¶
View Source
const ( LOG_DEBUG = LogLevel(logrus.DebugLevel) LOG_INFO = LogLevel(logrus.InfoLevel) LOG_WARN = LogLevel(logrus.WarnLevel) LOG_ERROR = LogLevel(logrus.ErrorLevel) )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger interface {
IsLevelEnabled(level LogLevel) bool
Printf(format string, a ...interface{})
Log(level LogLevel, format string, a ...interface{})
Debug(format string, a ...interface{})
Info(format string, a ...interface{})
// Warn logs a message. The err field can be left `nil`, otherwise the logger will format it into the message.
Warn(err error, format string, a ...interface{})
// Error logs an error. The err field can be left `nil`, otherwise the logger will format it into the message.
Error(err error, format string, a ...interface{})
// Nested return a new logger instance. `name` is the extra prefix to be prepended to each message. Leaving it blank
// will add no additional prefix. The new Logger will inherit the properties of the original.
Nested(name string) Logger
// GetConfig Returns a copy of the LoggerConfig associated with this Logger. This is meant to be used by the framework.
GetConfig() *LoggerConfig
// SetStream sets the output of this Logger. This is meant to be used by the framework.
SetStream(config *LoggerStreamConfig)
}
Logger General logger interface, can be used anywhere
type LoggerConfig ¶
LoggerConfig config related to the Logger. This needs to be serializable, so it can be passed around over the wire.
type LoggerStreamConfig ¶
LoggerStreamConfig stream related config to set on a Logger
Click to show internal directories.
Click to hide internal directories.