Documentation ¶
Index ¶
- Constants
- func Debug(args ...interface{})
- func Error(args ...interface{})
- func Fatal(args ...interface{})
- func Info(args ...interface{})
- func IsGreaterOrEqualTo(level Level) bool
- func NewContext(ctx context.Context, keyValuePairs ...interface{}) context.Context
- func Redact(msg string) string
- func SetDefaultLogger(l *logrus.Logger)
- func SetLevel(l Level)
- func SetLevelString(l string)
- func SetLogLevels(levels map[string]string)
- func SetLogSourceLine(enabled bool)
- func SetRedacting(enabled bool)
- func ShortDur(d time.Duration) string
- func Trace(args ...interface{})
- func Warn(args ...interface{})
- type Hook
- type Level
- type LevelFunc
Constants ¶
View Source
const ( LevelFatal = Level(logrus.FatalLevel) LevelError = Level(logrus.ErrorLevel) LevelWarn = Level(logrus.WarnLevel) LevelInfo = Level(logrus.InfoLevel) LevelDebug = Level(logrus.DebugLevel) LevelTrace = Level(logrus.TraceLevel) )
Variables ¶
This section is empty.
Functions ¶
func IsGreaterOrEqualTo ¶ added in v0.51.0
IsGreaterOrEqualTo returns true if the caller's current log level is equal or greater than the provided level.
func NewContext ¶
func SetDefaultLogger ¶
func SetLevel ¶
func SetLevel(l Level)
SetLevel sets the global log level used by the simple logger.
func SetLevelString ¶
func SetLevelString(l string)
func SetLogLevels ¶ added in v0.45.0
SetLogLevels sets the log levels for specific paths in the codebase.
func SetLogSourceLine ¶
func SetLogSourceLine(enabled bool)
func SetRedacting ¶ added in v0.43.0
func SetRedacting(enabled bool)
Types ¶
type Hook ¶ added in v0.43.0
type Hook struct { // Messages with a log level not contained in this array // will not be dispatched. If empty, all messages will be dispatched. AcceptedLevels []logrus.Level RedactionList []string // contains filtered or unexported fields }
Hook is a logrus hook for redacting information from logs
Click to show internal directories.
Click to hide internal directories.