Documentation ¶
Overview ¶
Package slogext is a small wrapper around the log/slog package focused on providing consistency in logging across the stencil codebase.
Index ¶
Constants ¶
View Source
const ( DebugLevel = charmlog.DebugLevel InfoLevel = charmlog.InfoLevel WarnLevel = charmlog.WarnLevel ErrorLevel = charmlog.ErrorLevel FatalLevel = charmlog.FatalLevel )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger interface { Info(string, ...any) Infof(string, ...any) Debug(string, ...any) Debugf(string, ...any) Error(string, ...any) Errorf(string, ...any) Warn(string, ...any) Warnf(string, ...any) With(...any) Logger WithError(error) Logger SetLevel(charmlog.Level) }
func NewTestLogger ¶
NewTestLogger creates a new logger for testing purposes. The logging level is set to DebugLevel to ensure all logs are captured.
Click to show internal directories.
Click to hide internal directories.