Documentation
¶
Index ¶
Constants ¶
View Source
const EnvVarLogFormat = "MONACO_LOG_FORMAT"
View Source
const EnvVarLogTime = "MONACO_LOG_TIME"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogOptions ¶
type LogOptions struct {
// FileLogging specifies whether logs should be additionally written to a file
// FileLoggingJSON specifies whether log lines to files should be JSON formatted
FileLoggingJSON bool
// ConsoleLoggingJSON specifies whether log lines written to the console should be JSON formatted
ConsoleLoggingJSON bool
// LogLevel specifies the log level to be used
LogLevel LogLevel
// LogSpy can be used as an additional log sink to capture the logs
LogSpy io.Writer
// LogTimeMode specifies which time mode shall be used when printing out logs
LogTimeMode LogTimeMode
File afero.File
}
LogOptions holds different options that can be passed to setup the logger to change its behavior
type LogTimeMode ¶
type LogTimeMode int
const ( LogTimeLocal LogTimeMode = iota LogTimeUTC )
func ParseLogTimeMode ¶
func ParseLogTimeMode(m string) LogTimeMode
type Logger ¶
type Logger interface {
Info(msg string, args ...interface{})
Error(msg string, args ...interface{})
Debug(msg string, args ...interface{})
Warn(msg string, args ...interface{})
Fatal(msg string, args ...interface{})
Level() LogLevel
}
Logger defines the interface for a logging implementation
Click to show internal directories.
Click to hide internal directories.