Documentation ¶ Index ¶ Variables func Default() *slog.Logger func New(cfg *Config, ow io.Writer) (*slog.Logger, error) type Config func (c *Config) SlogHandler(ow io.Writer) slog.Handler func (c *Config) SlogLevel() slog.Level func (c *Config) SlogOutput() io.Writer func (c *Config) Validate() error Constants ¶ This section is empty. Variables ¶ View Source var ( DefaultLevel slog.Level = slog.LevelInfo DefaultOutput io.Writer = os.Stdout ) Functions ¶ func Default ¶ func Default() *slog.Logger func New ¶ func New(cfg *Config, ow io.Writer) (*slog.Logger, error) Types ¶ type Config ¶ type Config struct { Level string `envconfig:"level" json:"level"` Format string `envconfig:"format" json:"format"` Output string `envconfig:"output" json:"output"` } func (*Config) SlogHandler ¶ func (c *Config) SlogHandler(ow io.Writer) slog.Handler func (*Config) SlogLevel ¶ func (c *Config) SlogLevel() slog.Level func (*Config) SlogOutput ¶ func (c *Config) SlogOutput() io.Writer func (*Config) Validate ¶ func (c *Config) Validate() error Source Files ¶ View all Source files logger.go Click to show internal directories. Click to hide internal directories.