Disponible

amalgame-logging

4 niveaux, ISO 8601 UTC, file sink optionnel.

amc package add logging GitHub ↗ ← Retour à l'écosystème

Vue d'ensemble

Logger structuré minimaliste. Niveaux Debug / Info / Warn / Error. Sortie stdout par défaut, file sink optionnel. Format ISO 8601 UTC pour les timestamps. Pas de magie : un appel = une ligne.

Caractéristiques

  • ✓Niveaux : Debug, Info, Warn, Error
  • ✓Format : ISO 8601 UTC + niveau + message
  • ✓Sink stdout par défaut, file sink optionnel
  • ✓Configurable par variable d'environnement AMC_LOG_LEVEL
  • ✓Thread-safe via mutex interne

Exemple

Exemple minimal d'utilisation — recopiable tel quel après l'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")

En bref

Packages liés