Discover Packages
github.com/Agrid-Dev/thermocktat
internal
logging
package
Version:
v0.10.0
Opens a new window with list of versions in this module.
Published: Jul 7, 2026
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package logging builds a configured *slog.Logger for the app.
The public surface is intentionally tiny: one Config, one constructor. Callers
receive a *slog.Logger value and inject it where needed; the process-global
slog.Default() is never modified.
New returns a *slog.Logger writing structured records to stderr.
type Config struct {
Level string `koanf:"level" json:"level" yaml:"level"`
Format string `koanf:"format" json:"format" yaml:"format"`
}
Config selects the level and output format. Invalid or empty values fall back
to info / text so a bad env var cannot prevent the app from starting.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.