Documentation ¶
Overview ¶
Package log creates logs in the same way as Prometheus, while ignoring errors
Index ¶
- func Debug(keyvals ...interface{})
- func DebugRateLimited(keyvals ...interface{})
- func Error(keyvals ...interface{})
- func Fatal(keyvals ...interface{})
- func GetLogger() log.Logger
- func Info(keyvals ...interface{})
- func Init(cfg Config) error
- func InitDefault()
- func Warn(keyvals ...interface{})
- func WarnRateLimited(keyvals ...interface{})
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Debug ¶
func Debug(keyvals ...interface{})
Debug logs a DEBUG level message, ignoring logging errors
func DebugRateLimited ¶
func DebugRateLimited(keyvals ...interface{})
DebugRateLimited logs Debug level logs once in every logOnceTimedDuration.
func Error ¶
func Error(keyvals ...interface{})
Error logs an ERROR level message, ignoring logging errors
func Info ¶
func Info(keyvals ...interface{})
Info logs an INFO level message, ignoring logging errors
func Init ¶
Init starts logging given the configuration. By default, it uses logfmt format and minimum logging level.
func InitDefault ¶
func InitDefault()
InitDefault is used to start the logger with sane defaults before we can configure it. It's useful in instances where we want to log stuff before the configuration has been successfully parsed. Calling Init function later on overrides this.
func Warn ¶
func Warn(keyvals ...interface{})
Warn logs a WARN level message, ignoring logging errors
func WarnRateLimited ¶
func WarnRateLimited(keyvals ...interface{})
WarnRateLimited warns once in every logOnceTimedDuration.