This is the log4cl-extras Reference Manual, version 0.11.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 06:54:15 2024 GMT+0.
log4cl-extras/log4cl-extras.asd
log4cl-extras/core/file-type.lisp
log4cl-extras/config/file-type.lisp
log4cl-extras/json/file-type.lisp
log4cl-extras/context/file-type.lisp
log4cl-extras/utils/file-type.lisp
log4cl-extras/plain/file-type.lisp
log4cl-extras/appenders/file-type.lisp
log4cl-extras/error/file-type.lisp
The main system appears first, followed by any subsystem dependency.
log4cl-extras
log4cl-extras/core
log4cl-extras/config
log4cl-extras/json
log4cl-extras/context
log4cl-extras/utils
log4cl-extras/plain
log4cl-extras/appenders
log4cl-extras/error
log4cl-extras
A bunch of addons to LOG4CL: JSON appender, context fields, cross-finger appender, etc.
Alexander Artemenko
(GIT https://github.com/40ants/log4cl-extras)
BSD
This library extends LOG4CL system in a few ways:
* It helps with configuration of multiple appenders and layouts.
* Has a facility to catch context fields and to log them.
* Has a macro to log unhandled errors.
* Adds a layout to write messages as JSON, which is useful for production as makes easier to parse and process such logs.
* Uses the appenders which are not disabled in case of some error which again, should be useful for production.
0.11.0
40ants-asdf-system
(system).
log4cl-extras/core
(system).
log4cl-extras/core
Alexander Artemenko
(GIT https://github.com/40ants/log4cl-extras)
BSD
log4cl-extras/config
(system).
log4cl-extras/error
(system).
log4cl-extras/config
Alexander Artemenko
(GIT https://github.com/40ants/log4cl-extras)
BSD
pythonic-string-reader
(system).
named-readtables
(system).
log4cl-extras/json
(system).
log4cl-extras/plain
(system).
alexandria
(system).
global-vars
(system).
log4cl-extras/appenders
(system).
40ants-doc
(system).
log4cl-extras/json
Alexander Artemenko
(GIT https://github.com/40ants/log4cl-extras)
BSD
log4cl
(system).
jonathan
(system).
log4cl-extras/context
(system).
log4cl-extras/utils
(system).
log4cl-extras/context
Alexander Artemenko
(GIT https://github.com/40ants/log4cl-extras)
BSD
pythonic-string-reader
(system).
named-readtables
(system).
40ants-doc
(system).
log4cl-extras/utils
Alexander Artemenko
(GIT https://github.com/40ants/log4cl-extras)
BSD
local-time
(system).
cl-strings
(system).
log4cl-extras/plain
Alexander Artemenko
(GIT https://github.com/40ants/log4cl-extras)
BSD
log4cl-extras/context
(system).
log4cl-extras/utils
(system).
log4cl-extras/appenders
Alexander Artemenko
(GIT https://github.com/40ants/log4cl-extras)
BSD
log4cl
(system).
global-vars
(system).
40ants-doc
(system).
log4cl-extras/error
Alexander Artemenko
(GIT https://github.com/40ants/log4cl-extras)
BSD
pythonic-string-reader
(system).
named-readtables
(system).
dissect
(system).
log4cl
(system).
log4cl-extras/context
(system).
log4cl-extras/utils
(system).
global-vars
(system).
with-output-to-stream
(system).
alexandria
(system).
Files are sorted by type and then listed depth-first from the systems components trees.
log4cl-extras/log4cl-extras.asd
log4cl-extras/core/file-type.lisp
log4cl-extras/config/file-type.lisp
log4cl-extras/json/file-type.lisp
log4cl-extras/context/file-type.lisp
log4cl-extras/utils/file-type.lisp
log4cl-extras/plain/file-type.lisp
log4cl-extras/appenders/file-type.lisp
log4cl-extras/error/file-type.lisp
log4cl-extras/core/file-type.lisp
log4cl-extras/core
(system).
log4cl-extras/config/file-type.lisp
log4cl-extras/config
(system).
setup
(function).
@configuration
(special variable).
make-appender
(function).
make-layout
(function).
make-logger
(function).
setup-logger
(function).
log4cl-extras/json/file-type.lisp
log4cl-extras/json
(system).
json-layout
(class).
layout-to-stream
(method).
+format-info+
(special variable).
get-timezone
(reader method).
write-json-item
(function).
log4cl-extras/context/file-type.lisp
log4cl-extras/context
(system).
get-fields
(function).
with-fields
(macro).
log4cl-extras/utils/file-type.lisp
log4cl-extras/utils
(system).
get-timestamp
(function).
is-sly-stream
(function).
limit-length
(function).
print-with-indent
(function).
remove-newlines
(function).
log4cl-extras/plain/file-type.lisp
log4cl-extras/plain
(system).
layout-to-stream
(method).
plain-layout
(class).
+format-info+
(special variable).
get-timezone
(reader method).
write-plain-item
(function).
log4cl-extras/appenders/file-type.lisp
log4cl-extras/appenders
(system).
dont-disable-mixin
(class).
handle-appender-error
(method).
stable-daily-file-appender
(class).
stable-file-appender
(class).
stable-this-console-appender
(class).
@appenders
(special variable).
log4cl-extras/error/file-type.lisp
log4cl-extras/error
(system).
make-args-filter
(function).
make-placeholder
(function).
placeholder
(class).
placeholder-name
(reader method).
placeholder-p
(function).
print-backtrace
(function).
print-object
(method).
with-log-unhandled
(macro).
@errors
(special variable).
@intro
(special variable).
@printing
(special variable).
apply-args-filters
(function).
call-with-log-unhandled
(function).
format-condition-object
(function).
format-frame
(function).
from-current-package
(function).
get-backtrace
(function).
get-current-args-filters
(function).
prepare
(function).
Packages are listed by definition order.
log4cl-extras/utils
log4cl-extras/plain
log4cl-extras/config
log4cl-extras/appenders
log4cl-extras/context
log4cl-extras/error
log4cl-extras
log4cl-extras/json
log4cl-extras/utils
common-lisp
.
get-timestamp
(function).
is-sly-stream
(function).
limit-length
(function).
print-with-indent
(function).
remove-newlines
(function).
log4cl-extras/plain
common-lisp
.
plain-layout
(class).
+format-info+
(special variable).
get-timezone
(generic reader).
write-plain-item
(function).
log4cl-extras/config
common-lisp
.
setup
(function).
@configuration
(special variable).
make-appender
(function).
make-layout
(function).
make-logger
(function).
setup-logger
(function).
log4cl-extras/appenders
common-lisp
.
dont-disable-mixin
(class).
stable-daily-file-appender
(class).
stable-file-appender
(class).
stable-this-console-appender
(class).
@appenders
(special variable).
log4cl-extras/context
common-lisp
.
get-fields
(function).
with-fields
(macro).
log4cl-extras/error
common-lisp
.
make-args-filter
(function).
make-placeholder
(function).
placeholder
(class).
placeholder-name
(generic reader).
placeholder-p
(function).
print-backtrace
(function).
with-log-unhandled
(macro).
@errors
(special variable).
@intro
(special variable).
@printing
(special variable).
apply-args-filters
(function).
call-with-log-unhandled
(function).
format-condition-object
(function).
format-frame
(function).
from-current-package
(function).
get-backtrace
(function).
get-current-args-filters
(function).
prepare
(function).
log4cl-extras/json
common-lisp
.
json-layout
(class).
+format-info+
(special variable).
get-timezone
(generic reader).
write-json-item
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Captures content of given fields into a dynamic variable.
These fields will be logged along with any log entry inside the WITH-FIELDS body.
Logs any ERROR condition signaled from the body. Logged message will have a "traceback" field.
You may specify a list of error classes to ignore as ERRORS-TO-IGNORE argument.
Errors matching (typep err <each-of errors-to-ignore>) will not be logged as "Unhandled".
Returns an alist of all fields defined using WITH-FIELDS macro in the current stack.
Keys are returned as downcased strings, prepared for logging.
Returns a function, suitable to be used in *ARGS-FILTERS* variable.
Function PREDICATE will be applied to each argument in the frame and if it returns T, then argument will be replaced with PLACEHOLDER.
Creates a placeholder for some secret value or omitted argument.
“‘
CL-USER> (log4cl-extras/error:make-placeholder "secret value")
#<secret value>
“‘
See LOG4CL-EXTRAS/SECRETS::@HARD-WAY section to learn, how to use placeholders to remove sensitive information from logs.
A helper to print backtrace. Could be useful to out backtrace
at places other than logs, for example at a web page.
This function applies the same filtering rules as WITH-LOG-UNHANDLED macro.
By default condition description is printed like this:
“‘
Condition REBLOCKS-WEBSOCKET:NO-ACTIVE-WEBSOCKETS: No active websockets bound to the current page.
“‘
But you can change this by providing an argument FORMAT-CONDITION. It should be a
function of two arguments: ‘(stream condition)‘.
Prints a prefix to each line of the of the text.
Setup loggers and appenders via confg.
Example:
“‘
(setup
’(:level :error
:appenders
(this-console
(file
:file "foo.log"
:layout json))
:loggers
((log4cl-extras/config
:loggers
((foo :level :debug)
(bar
:loggers
((some-class
:level debug))))))))
“‘
As you can see, SETUP function accepts a plist with keys :LEVEL, :APPENDERS and :LOGGERS.
:LEVEL key holds a logging level for the root logger. It could be :INFO, :WARN or :ERROR.
:APPENDERS is a list of list where each sublist should start from the appender type and arguments for it’s constructor.
Supported appenders are:
* ‘THIS-CONSOLE‘ corresponds to LOG4CL:THIS-CONSOLE-APPENDER class.
* ‘DAILY‘ corresponds to LOG4CL:DAILY-FILE-APPENDER class.
* ‘FILE‘ corresponds to LOG4CL:FILE-APPENDER.
To lookup supported arguments for each appender type, see these classes initargs.
the only difference is that :LAYOUT argument is processed in a special way:
:JSON value replaced with LOG4CL-EXTRAS/JSON:JSON-LAYOUT and :PLAIN is replaced
with LOG4CL-EXTRAS/PLAIN:PLAIN-LAYOUT.
And finally, you can pass to SETUP a list of loggers. Each item in this list
should be plist where first item is a symbolic name of a package or a function name
inside a package and other items are params for a nested SETUP call.
placeholder
)) ¶automatically generated reader method
name
.
dont-disable-mixin
) condition) ¶log4cl-impl
.
plain-layout
) stream logger level log-func) ¶log4cl-impl
.
json-layout
) stream logger level log-func) ¶log4cl-impl
.
placeholder
) stream) ¶layout
.
local-time::timezone
local-time:*default-timezone*
:timezone
This slot is read-only.
Objects of this class can be used as replacement to arguments in a backtrace.
They are printed like ‘#<some-name>‘.
This form was choosen to match the way how SBCL shows unused arguments: ‘#<unused argument>‘.
Placeholders should be created with MAKE-PLACEHOLDER function.
string
:name
This slot is read-only.
layout
.
local-time::timezone
local-time:*default-timezone*
:timezone
This slot is read-only.
daily-file-appender
.
dont-disable-mixin
.
dont-disable-mixin
.
file-appender
.
dont-disable-mixin
.
this-console-appender
.
A stack of data fields to be serialized to JSON
Fields are stored as a plist, and transformed into an alist before serialization.
plain-layout
)) ¶automatically generated reader method
json-layout
)) ¶automatically generated reader method
Jump to: | A C F G H I L M P R S W |
---|
Jump to: | A C F G H I L M P R S W |
---|
Jump to: | *
+
@
N S T |
---|
Jump to: | *
+
@
N S T |
---|
Jump to: | C D F J L P S |
---|
Jump to: | C D F J L P S |
---|