stdout

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const EnvPrefix = "STDOUT"
View Source
const OutKind = "stdout"

Variables

This section is empty.

Functions

func New deprecated

func New() (io.Writer, *slog.HandlerOptions, error)

New creates a stdout writer from environment config.

Deprecated: use NewFromConfig with explicit config ownership.

func NewFromConfig added in v1.1.0

func NewFromConfig(cfg Config) (io.Writer, *slog.HandlerOptions, error)

NewFromConfig creates a stdout writer from explicit config.

Types

type Config

type Config struct {
	Level slog.Level `env:"_LEVEL" envDefault:"INFO"`
}

func GetConfigFromEnv

func GetConfigFromEnv() (*Config, error)

Jump to

Keyboard shortcuts

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