logging

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opts ...LoggerOption) (*slog.Logger, error)

Types

type LoggerOption

type LoggerOption func(*options)

func WithFormat

func WithFormat(format string) LoggerOption

func WithLevel

func WithLevel(level int) LoggerOption

func WithOutput

func WithOutput(output string) LoggerOption

type LoggingConfig

type LoggingConfig struct {
	Level  int    `yaml:"level" env-default:"8"`
	Format string `yaml:"format" env-default:"json"`
	Output string `yaml:"output" env-default:"stdout"`
}

Directories

Path Synopsis
handlers
slogdiscard
Package slogdiscard provides a no-op logger and handler for the Go 'slog' package.
Package slogdiscard provides a no-op logger and handler for the Go 'slog' package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL