Extract sigil-log from sigil monorepo
This is the reference migration for the sigil-ecosystem modularization effort: sigil-log is the smallest / simplest candidate and serves as the template for subsequent extractions (sigil-http, sigil-json, sigil-mcp, ...).
The prior packages/sigil-log/ history in the monorepo is preserved here at the repo root via git filter-repo --path-rename. On top of that history this commit adds:
- README.md - standalone-repo usage, API summary, build/test, license - .gitignore - build/ and .sigil/ - manifest.scm - minimal guix-shell (pure-Scheme pkg, no vendored C) - dev-redirects.sgl - point codeberg:sigil/sigil at ../sigil checkout - package.sgl - explicit version "0.13.0", url flipped to codeberg.org/sigil/sigil-log, from-workspace deps on sigil-stdlib and sigil-json converted to from-git refs pinned to ^0.13.0 - sigil.lock - sigil deps install output, both deps resolve to v0.13.1
Verified: sigil build clean, sigil test 25/25 passing.
The playbook distilled from this extraction lives in folio at procedures/sigil-package-extraction.
.gitignore | 2 ++
README.md | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
dev-redirects.sgl | 6 ++++++
manifest.scm | 10 ++++++++++
package.sgl | 7 ++++---
sigil.lock | 13 +++++++++++++
6 files changed, 101 insertions(+), 3 deletions(-).gitignoreadded
build/.sigil/README.mdadded
# sigil-logStructured logging for [Sigil](https://codeberg.org/sigil/sigil).Provides configurable log levels, text and JSON output formats, per-modulefiltering, and lazy macros that skip evaluation when the level is inactive.This package was extracted from the sigil monorepo — the in-tree historyunder `packages/sigil-log/` is preserved here as `master`.## Usage```scheme(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 hereas `from-git` refs pinned to `^0.13.0`.## Build```shsigil deps installsigil build```## Testing```shsigil test```## LicenseBSD-3-Clause.dev-redirects.sgladded
;; Development redirects — point dependencies at local Sigil checkout(redirects repos: (list (for-repo url: "codeberg:sigil/sigil" use: (from-path dir: "../sigil"))))manifest.scmadded
;; sigil-log Development Environment;; Use with: guix shell -m manifest.scm;;;; sigil-log is pure Scheme with no vendored C, so the environment;; only needs the common Sigil build toolchain.(specifications->manifest '("gcc-toolchain" "make" "pkg-config"))package.sglmodified
(package name: "sigil-log" version: "0.13.0" description: "Structured logging for Sigil" url: "https://codeberg.org/sigil/sigil" url: "https://codeberg.org/sigil/sigil-log" license: "BSD-3-Clause" authors: (list "David Wilson <[email protected]>") dependencies: (list (from-workspace name: "sigil-stdlib") (from-workspace name: "sigil-json"))) (from-git url: "codeberg:sigil/sigil" package: "sigil-stdlib" version: "^0.13.0") (from-git url: "codeberg:sigil/sigil" package: "sigil-json" version: "^0.13.0")))sigil.lockadded
;; Auto-generated by sigil deps install. Do not edit.(lock (package name: "sigil-stdlib" url: "codeberg:sigil/sigil" ref: "^0.13.0" sha: "8738c6f0665f6593795daf98d63839d181b17a4f" package-selector: "sigil-stdlib") (package name: "sigil-json" url: "codeberg:sigil/sigil" ref: "^0.13.0" sha: "8738c6f0665f6593795daf98d63839d181b17a4f" package-selector: "sigil-json"))