Documentation
¶
Index ¶
Constants ¶
View Source
const ( TimeFormat string = "2006-01-02T15:04:05.000000" LoggerKey loggerKey = "logger" )
Variables ¶
This section is empty.
Functions ¶
func From ¶ added in v0.5.0
From returns the logger from the context. Returns a new logger if no logger is found in the context.
func ParseLogLevel ¶ added in v0.5.0
ParseLogLevel parses a string into a slog.Level
Types ¶
type Config ¶ added in v0.1.1
type Config struct {
// Level is the log Level for the logger that will be used
Level slog.Level `default:"info"`
// Format is the log Format for the logger that will be used
Format LogFormat `default:"text"`
// Output is the output writer that the logger will use
Output io.Writer
}
Config holds the settings for the logger
Click to show internal directories.
Click to hide internal directories.