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 { // JSONLogging specifies whether log lines should be structured JSON logs with additional fields. // If deactivated text logs are written and (most) fields added by Logger.WithFields are omitted. JSONLogging 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 is an optional file to write logs of level LogLevel and higher to File afero.File // ErrorFile is an optional file to write error level logs to ErrorFile 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{}) WithFields(fields ...field.Field) Logger Level() LogLevel GetLogr() logr.Logger }
Logger defines the interface for a logging implementation
Click to show internal directories.
Click to hide internal directories.