logging

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package logging provides process-wide structured logging for wowapi processes. It constructs an *slog.Logger from a kernel/config.Log and installs a defense-in-depth ReplaceAttr that catches accidental raw-string sensitive attributes. The primary redaction mechanism is structural — config.Secret implements slog.LogValuer — this handler is a second line of defense only.

See docs/blueprint/12-configuration-and-deployment.md §7 for the startup config-fingerprint requirement satisfied by LogStartup.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogStartup

func LogStartup(l *slog.Logger, process string, env config.Env, fp config.Fingerprint)

LogStartup emits a single Info record "starting" with the process name, deployment environment, and the full and short config fingerprints. This satisfies blueprint 12 §7: each process logs its config fingerprint at boot so drift between api/worker/migrate can be detected cheaply.

func New

func New(w io.Writer, cfg config.Log) (*slog.Logger, error)

New constructs an *slog.Logger writing to w, configured from cfg. Format "json" produces slog.NewJSONHandler; "text" produces slog.NewTextHandler. An unknown level or format is an error — both conditions are also caught by config.Framework.Validate, but New enforces them independently.

Types

This section is empty.

Jump to

Keyboard shortcuts

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