1
0
Fork
You've already forked sigil-log
0
Structured logging for Sigil.
  • Scheme 100%
Find a file
David Wilson 56e4fc5a52
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Bump sigil-log to Sigil 0.16
Update the package version, Sigil compatibility range, and sigil-json dependency range for the 0.16 ecosystem alignment.
Verification:
- /tmp/sigil-t-e6e9/build/dev/bin/sigil deps install --redirects /tmp/apiary-016-redirects.sgl
- /tmp/sigil-t-e6e9/build/dev/bin/sigil build --redirects /tmp/apiary-016-redirects.sgl
- /tmp/sigil-t-e6e9/build/dev/bin/sigil test
2026年05月06日 13:08:37 +03:00
src/sigil sigil-log,sigil-mcp: make logging non-fatal on format/port failure 2026年04月22日 06:48:13 +03:00
test sigil-log,sigil-mcp: make logging non-fatal on format/port failure 2026年04月22日 06:48:13 +03:00
.gitignore Extract sigil-log from sigil monorepo 2026年04月24日 08:09:04 +03:00
.woodpecker.yml Bump CI pin to sigil v0.14.3 2026年04月26日 20:18:04 +03:00
dev-redirects.sgl Extract sigil-log from sigil monorepo 2026年04月24日 08:09:04 +03:00
manifest.scm Extract sigil-log from sigil monorepo 2026年04月24日 08:09:04 +03:00
package.sgl Bump sigil-log to Sigil 0.16 2026年05月06日 13:08:37 +03:00
README.md Extract sigil-log from sigil monorepo 2026年04月24日 08:09:04 +03:00
sigil.lock Fix sigil-log 0.15 metadata conflict 2026年05月03日 10:32:07 +03:00

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.

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.