Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitLoggerFromEnv ¶ added in v0.14.0
func InitLoggerFromEnv()
Types ¶
type SlogTextHandler ¶
type SlogTextHandler struct {
*slog.TextHandler
// contains filtered or unexported fields
}
SlogTextHandler extends the standard slog.TextHandler to provide custom formatting that is very similar to the default slog handler. It prefixes each log entry with a right-padded level indicator and message, while excluding the default time, level, and message attributes from the structured output.
The output format is: LEVEL MESSAGE key1=value1 key2=value2
func NewSlogTextHandler ¶
func NewSlogTextHandler(w io.Writer, opts *slog.HandlerOptions) *SlogTextHandler
Click to show internal directories.
Click to hide internal directories.