Version0.16.0Verifiednot yet verifiedLicenseBSD-3-Clause

sigil-log

Structured logging for Sigil

Report a bug or suggest a feature
Readme

sigil-log

Structured logging for Sigil.

Provides configurable log levels, text and JSON output formats, per-module filtering, and lazy macros that skip evaluation when the level is inactive.

This package was extracted from the sigil monorepo — the in-tree history under packages/sigil-log/ is preserved here as master.

Usage

(import (sigil log))

(log-info "Server started" port: 8080)
(log-warn "Slow query" duration-ms: 1200)
(log-error "Request failed" path: "/api" status: 500)

;; Switch output format, raise/lower level
(log-configure! level: 'debug format: 'json)

;; Lazy macros — the argument expressions are not evaluated if the
;; current level suppresses the call site.
(log-debug* "result" value: (expensive-computation))

API

(sigil log)

Procedure / macroPurpose
log-configure!Set level, format, output target
log-configure-from-args!Parse --log-level / --log-format from a CLI argv
log-trace / log-debug / log-info / log-warn / log-error / log-fatalEmit at level
log-trace* / log-debug* / log-info* / log-warn* / log-error* / log-fatal*Lazy variants — skip argument evaluation when level inactive
log-level-active?Query whether a level would be emitted
current-log-levelReturn the currently configured level

Levels, low to high: trace, debug, info, warn, error, fatal.

Read the rest

Dependencies

  • sigil-stdlib
  • sigil-json

Both are workspace siblings in the sigil monorepo and are consumed here as from-git refs pinned to ^0.13.0.

Build

sigil deps install
sigil build

Testing

sigil test

License

BSD-3-Clause.

Clone

$ git clone https://codeberg.org/sigil/sigil-log

Releases

v0.16.0 — latest by version, released 6 May 2026

All releases — 5 tags in this repository.

Source

Browse the latest source

One page per file, and every line has a permalink.

Recent commitsAtom

The last 20 commits keep a page here. Everything older lives in the clone.