This is the a-cl-logger Reference Manual, version 1.0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 04:11:13 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
a-cl-logger
A logger that sends to multiple destinations in multiple formats. Based on arnesi logger
Russ Tyndall <russ@acceleration.net>
BSD
1.0.1
iterate
(system).
symbol-munger
(system).
alexandria
(system).
cl-interpol
(system).
cl-json
(system).
local-time
(system).
cl-json
(system).
closer-mop
(system).
osicat
(system).
exit-hooks
(system).
packages.lisp
(file).
utils.lisp
(file).
log.lisp
(file).
appenders.lisp
(file).
helpers.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
a-cl-logger/a-cl-logger.asd
a-cl-logger/packages.lisp
a-cl-logger/utils.lisp
a-cl-logger/log.lisp
a-cl-logger/appenders.lisp
a-cl-logger/helpers.lisp
a-cl-logger/a-cl-logger.asd
a-cl-logger
(system).
a-cl-logger/utils.lisp
packages.lisp
(file).
a-cl-logger
(system).
*appender*
(special variable).
*log-level-names*
(special variable).
*message*
(special variable).
*root-logger*
(special variable).
+debug+
(special variable).
+dribble+
(special variable).
+error+
(special variable).
+fatal+
(special variable).
+info+
(special variable).
+warn+
(special variable).
get-logger!
(macro).
require-logger!
(macro).
*logger*
(special variable).
*logger-vars*
(special variable).
*max-logger-name-length*
(special variable).
+muted+
(special variable).
as-json-array
(function).
as-json-object-member
(function).
class-name-of
(function).
define-mutator-macros
(macro).
ensure-level-value!
(macro).
ensure-list!
(macro).
ensure-message
(function).
ensure-message!
(macro).
format-time
(function).
maybe-with-presentations
(macro).
me-or-ancestor
(function).
only-one?
(function).
push-m-plist
(macro).
replace-symbols-in-forms
(function).
with-auto-unique-names
(macro).
with-debugging-or-error-printing
(macro).
with-logger-level
(macro).
with-logging-io
(macro).
with-macro-splicing
(macro).
without-earmuffs
(function).
a-cl-logger/log.lisp
utils.lisp
(file).
a-cl-logger
(system).
add-signal-handler
(function).
appender
(reader method).
(setf appender)
(writer method).
appenders
(reader method).
(setf appenders)
(writer method).
appending-message
(condition).
children
(reader method).
(setf children)
(writer method).
data-plist
(reader method).
(setf data-plist)
(writer method).
default-signal-bindings
(reader method).
(setf default-signal-bindings)
(writer method).
define-logger
(macro).
do-log
(function).
do-logging
(generic function).
format-args
(reader method).
(setf format-args)
(writer method).
format-control
(reader method).
(setf format-control)
(writer method).
generating-message
(condition).
get-logger
(function).
(setf get-logger)
(function).
initialize-instance
(method).
level
(reader method).
level
(reader method).
(setf level)
(writer method).
(setf level)
(writer method).
log-level
(generic function).
(setf log-level)
(generic function).
log-level-name-of
(function).
logger
(reader method).
logger
(reader method).
logger
(reader method).
(setf logger)
(writer method).
(setf logger)
(writer method).
(setf logger)
(writer method).
logger
(class).
logging-message
(condition).
make-message
(function).
message
(reader method).
message
(reader method).
message
(reader method).
(setf message)
(writer method).
(setf message)
(writer method).
(setf message)
(writer method).
message
(class).
name
(reader method).
name
(reader method).
name
(reader method).
(setf name)
(writer method).
(setf name)
(writer method).
(setf name)
(writer method).
parents
(reader method).
(setf parents)
(writer method).
print-object
(method).
require-logger
(function).
%logger-name-for-output
(function).
%make-log-helper
(function).
%safe-log-helper-arg
(function).
arg-literals
(reader method).
(setf arg-literals)
(writer method).
compile-time-enabled-p
(generic function).
compile-time-level
(reader method).
(setf compile-time-level)
(writer method).
copy-messsage
(function).
define-log-helpers
(macro).
do-append
(generic function).
enabled-p
(function).
ensure-level-value
(function).
ensure-type
(function).
form
(reader method).
(setf form)
(writer method).
get-logger-var-name
(function).
inner-error
(reader method).
(setf inner-error)
(writer method).
log-argument-evaluation-error
(condition).
log.compile-time-level
(generic function).
(setf log.compile-time-level)
(generic function).
logger-level-from-helper
(function).
logger-name-from-helper
(function).
logger-signal-handlers
(function).
maybe-signal-appending-message
(function).
maybe-signal-generating-message
(function).
maybe-signal-logging-message
(function).
maybe-signal-message
(function).
missing-logger
(function).
missing-logger
(condition).
rem-logger
(function).
signal-messages
(reader method).
(setf signal-messages)
(writer method).
split-log-helper
(function).
timestamp
(reader method).
(setf timestamp)
(writer method).
with-change-message
(macro).
a-cl-logger/appenders.lisp
log.lisp
(file).
a-cl-logger
(system).
alist-as-json
(function).
append-message
(generic function).
appender
(class).
debug-io-log-appender
(class).
ensure-debug-io-appender
(function).
ensure-file-appender
(function).
ensure-stderr-appender
(function).
file-log-appender
(class).
find-appender
(function).
format-message
(generic function).
formatter
(reader method).
(setf formatter)
(writer method).
formatter
(class).
initialize-instance
(method).
initialize-instance
(method).
json
(reader method).
(setf json)
(writer method).
json
(class).
json-formatter
(class).
level
(reader method).
(setf level)
(writer method).
(setf log-level)
(method).
log-stream
(reader method).
(setf log-stream)
(writer method).
plist-as-json
(function).
raw-formatter
(class).
remove-appender
(function).
stderr-log-appender
(class).
stream-log-appender
(class).
string-stream-appender
(class).
%filter-plist
(function).
%open-log-file
(function).
buffer-p
(reader method).
(setf buffer-p)
(writer method).
ensure-stream-appender
(function).
format-value
(generic function).
json-file-log-appender
(class).
log-file
(reader method).
(setf log-file)
(writer method).
(setf log-file)
(method).
logger-inspector-lookup-hook
(function).
with-stream-restarts
(macro).
a-cl-logger/helpers.lisp
appenders.lisp
(file).
a-cl-logger
(system).
close-all-files
(function).
get-log-fn
(function).
log-around
(macro).
log-errors
(macro).
log-serious-conditions
(macro).
make-log-path
(function).
push-into-message
(function).
setup-logger
(function).
when-log-message-appended
(macro).
when-log-message-generated
(macro).
with-appender
(macro).
with-logged-output
(macro).
with-logged-output-to-place
(macro).
close-message-block
(function).
open-message-block
(function).
root-logger.debug
(macro).
root-logger.dribble
(macro).
root-logger.error
(macro).
root-logger.fatal
(macro).
root-logger.info
(macro).
root-logger.muted
(macro).
root-logger.warn
(macro).
when-log-message-*
(macro).
when-log-message-logged
(macro).
Packages are listed by definition order.
a-cl-logger
a-log
common-lisp
.
iterate
.
*appender*
(special variable).
*log-level-names*
(special variable).
*message*
(special variable).
*root-logger*
(special variable).
+debug+
(special variable).
+dribble+
(special variable).
+error+
(special variable).
+fatal+
(special variable).
+info+
(special variable).
+warn+
(special variable).
add-signal-handler
(function).
alist-as-json
(function).
append-message
(generic function).
appender
(generic reader).
(setf appender)
(generic writer).
appender
(class).
appenders
(generic reader).
(setf appenders)
(generic writer).
appending-message
(condition).
children
(generic reader).
(setf children)
(generic writer).
close-all-files
(function).
data-plist
(generic reader).
(setf data-plist)
(generic writer).
debug-io-log-appender
(class).
default-signal-bindings
(generic reader).
(setf default-signal-bindings)
(generic writer).
define-logger
(macro).
do-log
(function).
do-logging
(generic function).
ensure-debug-io-appender
(function).
ensure-file-appender
(function).
ensure-stderr-appender
(function).
file-log-appender
(class).
find-appender
(function).
format-args
(generic reader).
(setf format-args)
(generic writer).
format-control
(generic reader).
(setf format-control)
(generic writer).
format-message
(generic function).
formatter
(generic reader).
(setf formatter)
(generic writer).
formatter
(class).
generating-message
(condition).
get-log-fn
(function).
get-logger
(function).
(setf get-logger)
(function).
get-logger!
(macro).
json
(generic reader).
(setf json)
(generic writer).
json
(class).
json-formatter
(class).
level
(generic reader).
(setf level)
(generic writer).
log-around
(macro).
log-errors
(macro).
log-level
(generic function).
(setf log-level)
(generic function).
log-level-name-of
(function).
log-serious-conditions
(macro).
log-stream
(generic reader).
(setf log-stream)
(generic writer).
logger
(generic reader).
(setf logger)
(generic writer).
logger
(class).
logging-message
(condition).
make-log-path
(function).
make-message
(function).
message
(generic reader).
(setf message)
(generic writer).
message
(class).
name
(generic reader).
(setf name)
(generic writer).
parents
(generic reader).
(setf parents)
(generic writer).
plist-as-json
(function).
push-into-message
(function).
raw-formatter
(class).
remove-appender
(function).
require-logger
(function).
require-logger!
(macro).
setup-logger
(function).
stderr-log-appender
(class).
stream-log-appender
(class).
string-stream-appender
(class).
when-log-message-appended
(macro).
when-log-message-generated
(macro).
with-appender
(macro).
with-logged-output
(macro).
with-logged-output-to-place
(macro).
%filter-plist
(function).
%logger-name-for-output
(function).
%make-log-helper
(function).
%open-log-file
(function).
%safe-log-helper-arg
(function).
*logger*
(special variable).
*logger-vars*
(special variable).
*max-logger-name-length*
(special variable).
+muted+
(special variable).
arg-literals
(generic reader).
(setf arg-literals)
(generic writer).
as-json-array
(function).
as-json-object-member
(function).
buffer-p
(generic reader).
(setf buffer-p)
(generic writer).
class-name-of
(function).
close-message-block
(function).
compile-time-enabled-p
(generic function).
compile-time-level
(generic reader).
(setf compile-time-level)
(generic writer).
copy-messsage
(function).
define-log-helpers
(macro).
define-mutator-macros
(macro).
do-append
(generic function).
enabled-p
(function).
ensure-level-value
(function).
ensure-level-value!
(macro).
ensure-list!
(macro).
ensure-message
(function).
ensure-message!
(macro).
ensure-stream-appender
(function).
ensure-type
(function).
form
(generic reader).
(setf form)
(generic writer).
format-time
(function).
format-value
(generic function).
get-logger-var-name
(function).
inner-error
(generic reader).
(setf inner-error)
(generic writer).
json-file-log-appender
(class).
log-argument-evaluation-error
(condition).
log-file
(generic reader).
(setf log-file)
(generic function).
log.compile-time-level
(generic function).
(setf log.compile-time-level)
(generic function).
logger-inspector-lookup-hook
(function).
logger-level-from-helper
(function).
logger-name-from-helper
(function).
logger-signal-handlers
(function).
maybe-signal-appending-message
(function).
maybe-signal-generating-message
(function).
maybe-signal-logging-message
(function).
maybe-signal-message
(function).
maybe-with-presentations
(macro).
me-or-ancestor
(function).
missing-logger
(function).
missing-logger
(condition).
only-one?
(function).
open-message-block
(function).
push-m-plist
(macro).
rem-logger
(function).
replace-symbols-in-forms
(function).
root-logger.debug
(macro).
root-logger.dribble
(macro).
root-logger.error
(macro).
root-logger.fatal
(macro).
root-logger.info
(macro).
root-logger.muted
(macro).
root-logger.warn
(macro).
signal-messages
(generic reader).
(setf signal-messages)
(generic writer).
split-log-helper
(function).
timestamp
(generic reader).
(setf timestamp)
(generic writer).
when-log-message-*
(macro).
when-log-message-logged
(macro).
with-auto-unique-names
(macro).
with-change-message
(macro).
with-debugging-or-error-printing
(macro).
with-logger-level
(macro).
with-logging-io
(macro).
with-macro-splicing
(macro).
with-stream-restarts
(macro).
without-earmuffs
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
By default all loggers have the *root-logger* as a parent
like ignore-errors but logs instead
like ignore-errors but logs instead
Add an appender to logger for the duration of the scope
Create a pre-encoded json object from an alist
Given a logger identifier name like ’adwolf-log.debug or ’adwolf-log find the logger
associated with it and build a (lambda (message &rest args)) that can be
funcalled to log to that logger.
Create a pre-encoded json object from a plist
Reconfigures a logger such that it matches the setup specified
This is sometimes necessary if your streams get messed up (eg: slime
disconnect and reconnect)
Always ensure there is a *error-output* stream logger
and if a file-name is passed in a file-logger going to it
The method responsible for actually putting the logged information somewhere
file-log-appender
) message) ¶stream-log-appender
) message) ¶appending-message
)) ¶appending-message
)) ¶Applys a message to the loggers appenders
Message is either a string or a list. When it’s a list and the first
element is a string then it’s processed as args to
cl:format.
appender
) (formatter json-formatter
) (message message
) stream) ¶Change the logger’s level of to NEW-LEVEL. If RECUSIVE is T the setting is also applied to the sub logger of logger.
stream-log-appender
)) ¶automatically generated reader method
stream-log-appender
)) ¶automatically generated writer method
appending-message
)) ¶logging-message
)) ¶appending-message
)) ¶logging-message
)) ¶appending-message
)) ¶appending-message
)) ¶logging-message
)) ¶logging-message
)) ¶generating-message
)) ¶generating-message
)) ¶string-stream-appender
) &key &allow-other-keys) ¶condition
.
(quote nil)
:message
The base of all log appenders (destinations)
Initarg | Value |
---|---|
:stream | *debug-io* |
The base class of all message formatters
A type to know when something is already encoded, so that
we just write it out. It is sometimes beneficial to pre-encode some bits of
log data and this allows that
The base class of all json formatters
(setf appenders)
.
appenders
.
(setf children)
.
children
.
(setf compile-time-level)
.
compile-time-level
.
(setf default-signal-bindings)
.
default-signal-bindings
.
initialize-instance
.
(setf level)
.
level
.
log-level
.
(setf name)
.
name
.
(setf parents)
.
parents
.
print-object
.
(setf signal-messages)
.
signal-messages
.
t
:signal-messages
:default-signal-bindings
The logger this logger inherits from.
(quote nil)
:parents
The logger which inherit from this logger.
(quote nil)
:children
A list of appender objects this logger sholud send messages to.
(quote nil)
:appenders
This loggers level.
(or null integer)
:level
This loggers’s compile time level. Any log expression below this level will macro-expand to NIL.
(or null integer)
:compile-time-level
:logger
:level
:format-control
:format-args
:data-plist
:arg-literals
(local-time:now)
:timestamp
format the message with no annotations
Initarg | Value |
---|---|
:stream | *error-output* |
Human readable to the console logger.
a log that appends all messages into a string stream
defines mutator macros for a function name
eg: ensure-account-id =>
(defmacro ensure-account-id! (&rest places) ... )
which (setf place (name place) for each place)
%name is just so we dont accidentally run into someone
using name accidentally
Buffer the output to var, printing as if to a swank dedicated presentation stream, dumping to a freshline on the output-stream when done.
A macro that allows appending data to the log message based on the dynamic
context of the message as it is being generated.
The data-builder-form will be executed inside a context where
(push-into-message key value) is a function to put data into the message
the first form is
Inside of the handler body, a ‘change-message‘ restart is available
Ex: attaching information about the current http-context to log messages
originating from it.
Set the level of the listed logger(s) to NEW-LEVEL and restore the original value in an unwind-protect.
Double quasi-quoting hurts my head so lets do it a bit different
Instead lets replace symbols in the expansion with values named by the
same symbols in the expansion environment.
Obviously care needs to be taken when processing forms passed by the
user, but that is the name of the macro game.
Variables starting with an @ (such as @body) are spliced as with
‘(progn ,@)
In the interest of enhanced readability it is suggested that all template
variables start with $ or @ so that they stand out
eg:
(let ((@b ’(2 3))) (with-macro-splicing (($a 1) @b) (+ $a @b 4)))
=> (+ 1 2 3 4)
Output the logger name such that it takes exactly :width characters and displays the right most :width characters if name is too long
this simplifies our formatting
Creates macros like logger.debug to facilitate logging
Processor for forms using with-macro-splicing
file-log-appender
)) ¶automatically generated reader method
file-log-appender
)) ¶automatically generated writer method
log-argument-evaluation-error
)) ¶log-argument-evaluation-error
)) ¶json-formatter
)) ¶log-argument-evaluation-error
)) ¶log-argument-evaluation-error
)) ¶file-log-appender
)) ¶Name of the file to write log messages to.
file-log-appender
)) ¶file-log-appender
)) ¶Name of the file to write log messages to.
Change the compile time log level of logger to NEW-LEVEL. If RECUSIVE is T the setting is also applied to the sub loggers.
Initarg | Value |
---|---|
:date-format | iso |
:formatter | (quote json-formatter) |
Jump to: | %
(
A B C D E F G I J L M N O P R S T W |
---|
Jump to: | %
(
A B C D E F G I J L M N O P R S T W |
---|
Jump to: | *
+
A B C D F I J L M N P S T |
---|
Jump to: | *
+
A B C D F I J L M N P S T |
---|
Jump to: | A C D F G H J L M P R S U |
---|
Jump to: | A C D F G H J L M P R S U |
---|