Available

amalgame-logging

4 levels, ISO 8601 UTC, optional file sink.

amc package add logging GitHub ↗ ← Back to the ecosystem

Overview

Minimal structured logger. Debug / Info / Warn / Error levels. stdout sink by default, optional file sink. ISO 8601 UTC timestamps. No magic: one call = one line.

Features

  • Levels: Debug, Info, Warn, Error
  • Format: ISO 8601 UTC + level + message
  • stdout sink by default, optional file sink
  • Configurable via AMC_LOG_LEVEL env var
  • Thread-safe via internal mutex

Example

Minimal usage example — copy-paste runnable after install.

amc package add logging

let log = Logger.New("my-app")
log.Info("server started on :8080")
log.Warn("config file missing, using defaults")
log.Error("db connection failed")

At a glance

Related packages