Skip to main content
Version: In development — v0.2.3

Logging

The logging package is initialized by colibri.InitializeApp() and uses log/slog.

logging.Info(ctx).
AddParam("userId", userID).
Msg("user created")

Use Debug, Info, Warn, and Error for regular messages. Fatal(...).Msg(...) logs and panics.

Set LOG_LEVEL to debug, info, warn, warning, or error. Local environments use text output; sandbox and production use JSON.

ctx = logging.InjectCorrelationIDInContext(ctx, requestID)

Subsequent logging calls include the correlationId field when they receive that context. Do not log credentials or personal data.