changelog shortlog graph tags branches changeset files revisions annotate raw help

Mercurial > core / lisp/lib/log/pkg.lisp

changeset 698: 96958d3eb5b0
parent: 609931bd65ba
author: Richard Westhaver <ellis@rwest.io>
date: Fri, 04 Oct 2024 22:04:59 -0400
permissions: -rw-r--r--
description: fixes
1 ;;; log.lisp --- logging facade for lisp
2 
3 ;; this package contains a simple logging facade for lisp applications
4 ;; and libraries.
5 
6 ;;; Commentary:
7 
8 ;; Use *LOG-LEVEL* to set the current level of logging. Value is
9 ;; either a boolean or one of the following keywords: :warn :info
10 ;; :debug :trace.
11 
12 ;; top-level macros: info! trace! warn! debug!
13 
14 ;; inspired by rust-lang/log https://crates.io/crates/log
15 
16 ;; I intend to keep things simple for a while and then work out a DSL
17 ;; for configuring logging. The DSL will be embedded in skelfiles.
18 
19 ;; the following shell environment variables may be queried by this
20 ;; package:
21 
22 ;; - LOG_LEVEL : corresponds to a value for *LOG-LEVEL*. value may be
23 ;; - empty or one of the following string values: WARN INFO DEBUG TRACE
24 
25 ;;; Code:
26 (defpackage :log
27  (:use :cl :std)
28  (:export :*log-level* :*log-router* :*logger*
29  :*default-log-router* :log-router :make-log-router :log-router-p
30  :get-real-time-since :init-log-timestamp
31  :*log-timestamp* :log-level-designator :log-timestamp-source :logger
32  :logger-p :make-logger :log-error
33  :define-log-level :log! :warn! :info! :debug! :trace! :fatal! :error!
34  :log-p :warn-p :info-p :debug-p :trace-p :error-p :fatal-p
35  :log-describe :warn-describe :info-describe :debug-describe :trace-describe :fatal-describe :error-describe))