Documentation ¶
Overview ¶
Package slog provides the slog handler.
Index ¶
Constants ¶
View Source
const ( // DefaultFormat is the default format for slog. DefaultFormat = "text" // DefaultFile is the default target for slog. DefaultFile = "os.Stderr" )
View Source
const Name = "slog"
Name is this providers name.
Variables ¶
This section is empty.
Functions ¶
func Factory ¶
func Factory(sections []string, configs types.ConfigData, opts ...log.Option) (log.ProviderType, error)
Factory is the factory for a slog provider.
Types ¶
type Config ¶
type Config struct { log.Config // Format is the log format, either json or text. Format string `json:"format" yaml:"format"` File string `json:"file" yaml:"file"` }
Config is the config struct for slog.
Click to show internal directories.
Click to hide internal directories.