fastlog

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2025 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const EnvPrefix = "LOG"
View Source
const (
	Separator = ":"
)

Variables

This section is empty.

Functions

func SetupDefaultLog

func SetupDefaultLog(m ...slogmulti.Middleware)

Types

type Config

type Config struct {
	Outputs         []string   `env:"_OUTPUTS" envDefault:"stderr:json"`
	Level           slog.Level `env:"_LEVEL" envDefault:"INFO"`
	Caller          bool       `env:"_CALLER" envDefault:"true"`
	ErrorFormatting bool       `env:"_ERROR_FORMATING" envDefault:"false"`
}

func GetConfigFromEnv

func GetConfigFromEnv() (*Config, error)

func (*Config) GetHandler

func (c *Config) GetHandler(m ...slogmulti.Middleware) (slog.Handler, error)

Directories

Path Synopsis
nop

Jump to

Keyboard shortcuts

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