logging

package
v0.0.1-rc3 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package logging builds the process-wide *slog.Logger from a LoggingConfig.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(w io.Writer, opts Options) (*slog.Logger, error)

New returns a configured *slog.Logger writing to w. Pass os.Stderr in production. Returns an error for malformed level/format strings.

Types

type Options

type Options struct {
	Level  string // debug | info | warn | error
	Format string // json | text
}

Options mirrors the resolved values from config.LoggingConfig. Defined as its own struct here to keep this package independent of internal/config.

Jump to

Keyboard shortcuts

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