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 / macro | Purpose |
|---|---|
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-fatal | Emit 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-level | Return the currently configured level |
Levels, low to high: trace, debug, info, warn, error, fatal.
Read the rest
Dependencies
sigil-stdlibsigil-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 buildTesting
sigil testLicense
BSD-3-Clause.
$ git clone https://codeberg.org/sigil/sigil-log
v0.16.0 — latest by version, released 6 May 2026
All releases — 5 tags in this repository.
One page per file, and every line has a permalink.
56e4fc5a
211a16c7
ce9a95b3
edabe699
069052a3
The last 20 commits keep a page here. Everything older lives in the clone.