WeSearch

Scriba: Structured Logging in Lisp (Guile Scheme)

jjba23· ·1 min read · 0 reactions · 0 comments · 12 views
#logging#lisp#programming#development
Scriba: Structured Logging in Lisp (Guile Scheme)
⚡ TL;DR · AI summary

Scriba introduces an auto-logger feature for structured logging in Lisp, specifically in Guile Scheme. This feature allows for easy configuration of logging behaviors based on the environment, facilitating different logging formats for development and production. The auto-logger can read environment variables to determine the appropriate logger and settings at runtime.

Key facts
Original article
Codeberg.org · jjba23
Read full at Codeberg.org →
Opening excerpt (first ~120 words) tap to expand

While you can instantiate specific loggers manually, the simplest way to get started is with the auto-logger. It reads environment variables (and, in the future, Scheme configuration files) to automatically determine at runtime which logger to use and how to configure it. This is especially useful for maintaining different logging behaviors between development and production environments. A common use-case is to use a pretty and colorful console logger in local development, and structured JSON logging in production, for logs to be parsed and aggregated by tools like Loki. (define-module (my-module) #:use-module (scriba auto) #:use-module (scriba scriba)) (let* ((s (scriba-auto-logger))) (log-info s "Hello Scriba!") (with-log-context `((key-1 .

Excerpt limited to ~120 words for fair-use compliance. The full article is at Codeberg.org.

Anonymous · no account needed
Share 𝕏 Facebook Reddit LinkedIn Threads WhatsApp Bluesky Mastodon Email

Discussion

0 comments

More from Codeberg.org