logging

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package logging configures application-wide structured logging.

All log output is emitted as JSON on stdout via log/slog so it can be parsed safely by a log-aggregation stack (e.g. Grafana Loki) without brittle line-based regex. Application code logs through the slog default logger (slog.Info/Warn/Error/…); this package wires that default up and also bridges the standard library's log package so that any third-party code still using it produces structured lines too.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup

func Setup() *slog.Logger

Setup installs a JSON slog handler as the process-wide default logger and returns it. The level is taken from LOG_LEVEL (debug|info|warn|error), defaulting to info. Call once, as early in main as possible.

Types

This section is empty.

Jump to

Keyboard shortcuts

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