Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Level ¶
type Level string
Level is a string representation of log level, which can easily be passed as a parameter, in lieu of defined types in upstream logging packages.
const ( DefaultLevel = InfoLevel TraceLevel Level = "trace" DebugLevel Level = "debug" InfoLevel Level = "info" WarnLevel Level = "warn" ErrorLevel Level = "error" PanicLevel Level = "panic" FatalLevel Level = "fatal" )
Log levels.
func ParseLevel ¶
ParseLevel takes a string level and returns the sclog Level constant. If the level is not recognized, it defaults to `sclog.InfoLevel` to swallow potential configuration errors/typos when specifying log levels. https://pkg.go.dev/github.com/sirupsen/logrus#ParseLevel
type Logger ¶
Logger exposes logging capabilities using https://pkg.go.dev/github.com/go-logr/logr.
func NewCronLogger ¶
NewCronLogger creates an instance of *Logger.
func NewLogger ¶
NewLogger creates an instance of *Logger. TODO(log): Consider adopting production config from zap.
func NewLogrusLogger ¶
NewLogrusLogger creates an instance of *Logger backed by the supplied logrusLog instance.