Coverage report: /home/ellis/comp/core/lib/log/pkg.lisp
Kind | Covered | All | % |
expression | 0 | 1 | 0.0 |
branch | 0 | 0 | nil |
Key
Not instrumented
Conditionalized out
Executed
Not executed
Both branches taken
One branch taken
Neither branch taken
1
;;; log.lisp --- logging facades for lisp
3
;; this package contains logging facilities for lisp applications and libraries.
10
;; The simple logging interface works as follows:
12
;; Use *LOG-LEVEL* to set the current level of logging. Value is
13
;; either a boolean or one of the following keywords: :warn :info
16
;; top-level macros: info! trace! warn! debug!
18
;; inspired by rust-lang/log https://crates.io/crates/log
20
;; the following shell environment variables may be queried by this
23
;; - LOG_LEVEL : corresponds to a value for *LOG-LEVEL*. value may be
24
;; - empty or one of the following string values: WARN INFO DEBUG TRACE
28
;; The advanced logging interface is based on Shinmera's VERBOSE which
29
;; implements basically all of the functionality we would expect in a logging
32
;; VERBOSE is built on top of another library from Shinmera's collection
33
;; called PIPING which provides a message-passing CLOS API. We have taken the
34
;; liberty to port over most of this functionality into a STD/PIPE package and
35
;; use it to build a logging framework using the same methodology.
37
;; In our case, the LOGGER class inherits from the STD/PIPE:PIPE class which
38
;; encapsulates one slot consisting of an array (the pipeline or PIPE) and
39
;; another slot providing an INDEX of cached lookup values into the array.
41
;; The LOGGER object is multi-threaded by default and handles marshalling of
42
;; MESSAGE objects through the ELEMENTs of the PIPE. A MESSAGE is handled by
43
;; each ELEMENT in the PIPE via the MSG method.
45
;; There are various ELEMENT implementations provided including level and tag
46
;; filters, condition handlers, as well as SINK elements which are responsible
47
;; for printing the final output of a MESSAGE to a stream or file.
51
(:use :cl :std :std/meta :std/thread :time :db :config :ast :id :build :schema)
52
(:export :*log-level* :*logger* :log-router
53
:make-log-router :log-router-p
54
:get-real-time-since :init-log-timestamp
55
:*log-timestamp* :log-level-designator :log-timestamp-source :logger
56
:logger-p :make-logger :log-error
57
:define-log-level :log! :warn! :info! :debug! :trace! :fatal! :error!
58
:log-p :warn-p :info-p :debug-p :trace-p :error-p :fatal-p
59
:log-describe :warn-describe :info-describe :debug-describe :trace-describe :fatal-describe :error-describe
62
:*log-timestamp-format*
80
:default-logger-config
89
:octets-to-log-message
90
:log-message-to-octets
94
:*simple-log-message-formatter*