Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DebugLevel ¶
func DebugLevel() uint32
func IsDebugLevel ¶
Types ¶
type Logger ¶
type Logger interface {
Info(string, ...any)
Warn(string, ...any)
Debug(string, ...any)
Error(string, ...any)
Fatal(string, ...any)
Panic(string, ...any)
Trace(string, ...any)
SetLevel(level uint32)
GetLevel() uint32
SetOutput(writer io.Writer)
}
Logger is the interface we want for our logger, so we can plug different ones easily
func New ¶
func New(opts ...LoggerOptions) Logger
type LoggerOptions ¶
func WithBuffer ¶
func WithBuffer(b *bytes.Buffer) LoggerOptions
WithBuffer will set a logger that stores all logs in a buffer, used mainly for testing
func WithDiscardAll ¶
func WithDiscardAll() LoggerOptions
WithDiscardAll will set a logger that discards all logs, used mainly for testing
Click to show internal directories.
Click to hide internal directories.