Documentation ¶
Overview ¶
Package logger is an adaptation wrapper that simplifies logging in the main code whilst also allowing a pluggable test logger.
Index ¶
- Variables
- func Create(w io.Writer, opts *slog.HandlerOptions)
- func Debug(msg string, args ...any)
- func Error(msg string, args ...any)
- func Errorf(msg string, args ...any)
- func HttpLogConfig() sloghttp.Config
- func Info(msg string, args ...any)
- func Log(level slog.Level, msg string, args ...any)
- func Warn(msg string, args ...any)
Constants ¶
This section is empty.
Variables ¶
View Source
var Exit = func(code int) { os.Exit(code + int(errorCount.Load())) }
View Source
var Logger = slog.Default()
Logger is a global logger that is able to handle concurrent logging safely.
Functions ¶
func HttpLogConfig ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.