Macro log4cl-extras/error:with-log-unhandled
now handles SERIOUS-CONDITION
instead of ERROR
. This is important, because ERROR
is not a only subclass of the SERIOUS-CONDITION
, for example, SB-EXT:TIMEOUT
is inherited directly from SERIOUS-CONDITION
and old version of the macro was not able to log such errors.
Variable log4cl-extras/appenders:*debug-on-error*
was added and can be used to debug issues happening when handling log messages.
When this option is NIL
, appenders defined in log4cl-extras will only output "Unable to log the message" message in case of errors
during the message output.
- Package log4cl-extras now is created when library is loaded. This should fix a warning from
ASDF
about missing package.
Function log4cl-extras/error:print-backtrace
now prints conditions with type like:
Condition REBLOCKS-WEBSOCKET:NO-ACTIVE-WEBSOCKETS: No active websockets bound to the current page.
instead of:
Condition: No active websockets bound to the current page.
- Macro
log4cl-extras/error:with-log-unhandled
now hasERRORS-TO-IGNORE
argument. You can pass a list of class-names of conditions which should not be logged.
- Backtrace printer was fixed to work on Clozure
CL
.
- Now
log4cl-extras/secrets:make-secrets-replacer
is able to mask secret values even in strings nested in the lists. This fixes issue of leaking Authorization tokens when someHTTP
error is logged. Previously, backtrace was logged like this:
1 File "/Users/art/projects/lisp/cloud-analyzer/.qlot/dists/ultralisp/software/fukamachi-dexador-20220619102143/src/backend/usocket.lisp", line 451
In DEXADOR.BACKEND.USOCKET:REQUEST
Args (#<unavailable argument> :METHOD :GET :HEADERS (("Authorization" . "OAuth AQAEA5qgMKaqAAffdZ0Nw7BqTkCTlp6ii80Gdmo")))
and oauth token leaked to the log storage. After this fix, backtrace will be logged like this:
1 File "/Users/art/projects/lisp/cloud-analyzer/.qlot/dists/ultralisp/software/fukamachi-dexador-20220619102143/src/backend/usocket.lisp", line 451
In DEXADOR.BACKEND.USOCKET:REQUEST
Args (#<unavailable argument> :METHOD :GET :HEADERS (("Authorization" . "OAuth #<secret value>")))
- A new variable
log4cl-extras/error:*args-filter-constructors*
was introduced. It should be used together withlog4cl-extras/secrets:make-secrets-replacer
to prevent secrets collection during the program life. Previosly, when you created a secrets replaced and stored in in thelog4cl-extras/error:*args-filters*
variable, all secrets from logged backtraces were collected in a closure's state. Whenlog4cl-extras/error:*args-filter-constructors*
variable is used, a new secrets replacer will be created for processing of each backtrace.
- Macro
log4cl-extras/error:with-log-unhandled
now uses internal function and you can change backtrace length on the fly by changinglog4cl-extras/error:*max-traceback-depth*
variable. - Also,
log4cl-extras/error:*max-call-length*
variable was documented.
- Now
:PLAIN
and:JSON
logger will output logger's category, filename and a callable name.
- Fixed fail during logging error with
(setf some-func)
in the backtrace.
- Function
TRACEBACK-TO-STRING
was removed and replaced withlog4cl-extras/error:print-backtrace
which is now a part of publicAPI
. - Added ability to filter secret and sensitive values. Read documentation, to lear more.
- Fixed
with-log-unhandled
for cases when some function argument's print-object signaled the error.
Because of this nasty error, sometimes with-log-unhandled
didn't log "Unandled error".
- Now
log4cl-extras/error:with-log-unhandled
macro accepts key argumentDEPTH
which is 10 by default.
This argument can be overriden by setting log4cl-extras/error:*max-traceback-depth*
.
- Also another variable
log4cl-extras/error:*max-call-length*
can be set to control how long function or method name can be. By default it is 100, but methods are logged along with their specialized arguments and can be longer.
- Added missing dependency from
CL-STRINGS
system.
Now log4cl-extras/config:setup
sets appender into a mode when it prints log in a human
readable way if it its called from the SLY
's REPL
. All logger fields are
printed as well, including a traceback.
- Now condition's description is added to the end of the backtrace.
- Fixed system's loading in environments with
C
locale.
This closes issue reported along with pull request #1.
- Previously, macros
log4cl-extras/error:with-log-unhandled
catched every signal, not only signals derived fromERROR
. Because of that, it logged traceback for non error signals like that:
lisp (log4cl-json/error:with-log-unhandled () (signal "foo"))
Now this bad behavior was fixed and only errors
are logged.
- Added ability to log tracebacks using
log4cl-extras/error:with-log-unhandled
.
- Initial version.