Documentation ¶
Index ¶
- Constants
- func InitLogger(appName string, logLevel int) error
- type LogConsumer
- type Logger
- func (logger *Logger) AddLogConsumer(logConsumer LogConsumer)
- func (logger *Logger) Debug(message string)
- func (logger *Logger) DebugMap(entry map[string]interface{})
- func (logger *Logger) Error(message string)
- func (logger *Logger) ErrorErr(err error)
- func (logger *Logger) ErrorMap(entry map[string]interface{})
- func (logger *Logger) Info(message string)
- func (logger *Logger) InfoMap(entry map[string]interface{})
- func (logger *Logger) Warn(message string)
- func (logger *Logger) WarnMap(entry map[string]interface{})
Constants ¶
View Source
const ( LogLevelError = iota LogLevelWarn = iota LogLevelInfo = iota LogLevelDebug = iota )
Variables ¶
This section is empty.
Functions ¶
func InitLogger ¶
Should be called before using the logger - sets the app name and minimum log level of messages that should be handled
Types ¶
type LogConsumer ¶
Enables defining additional log handlers, mainly used for unit tests
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Main logger structure
func (*Logger) AddLogConsumer ¶
func (logger *Logger) AddLogConsumer(logConsumer LogConsumer)
Click to show internal directories.
Click to hide internal directories.