Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // SetDefault ... SetDefault = slog.SetDefault // StrAttr алиасы типов StrAttr = slog.String // BoolAttr ... BoolAttr = slog.Bool // Float64Attr ... Float64Attr = slog.Float64 // AnyAttr ... AnyAttr = slog.Any // DurationAttr ... DurationAttr = slog.Duration // IntAttr ... IntAttr = slog.Int // Int64Attr ... Int64Attr = slog.Int64 // GroupValue ... GroupValue = slog.GroupValue // Group ... Group = slog.Group )
Functions ¶
func ContextWithLogger ¶
ContextWithLogger adds logger to context
Types ¶
type Logger ¶
Logger алиасы типов
type LoggerOption ¶
type LoggerOption func(options *options)
LoggerOption ...
func WithAddSource ¶
func WithAddSource(addSource bool) LoggerOption
WithAddSource logger option sets the add source option, which will add source file and line number to the log record.
Click to show internal directories.
Click to hide internal directories.