Skip to content

Commit

Permalink
A few changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
svetlyak40wt committed Nov 28, 2023
1 parent 8956eaa commit b1a12eb
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 5 deletions.
3 changes: 1 addition & 2 deletions log4cl-extras.asd
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
;; additional dependency system :secret-values
;;
;; "log4cl-extras/secrets"
"log4cl-extras/config"
"log4cl-extras/error")
"log4cl-extras/core")
:description "A bunch of addons to LOG4CL: JSON appender, context fields, cross-finger appender, etc."
:long-description "
Expand Down
4 changes: 2 additions & 2 deletions qlfile.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
("quicklisp" .
(:class qlot/source/dist:source-dist
:initargs (:distribution "http://beta.quicklisp.org/dist/quicklisp.txt" :%version :latest)
:version "2023-02-15"))
:version "2023-10-21"))
("ultralisp" .
(:class qlot/source/dist:source-dist
:initargs (:distribution "http://dist.ultralisp.org/" :%version :latest)
:version "20230422190002"))
:version "20231119095000"))
11 changes: 10 additions & 1 deletion src/appenders.lisp
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
(defpackage #:log4cl-extras/appenders
(:use #:cl)
(:import-from #:log4cl)
(:import-from #:global-vars
#:define-global-var)
(:export
#:stable-daily-file-appender
#:stable-this-console-appender
#:dont-disable-mixin
#:stable-file-appender))
#:stable-file-appender
#:*debug-on-error*))
(in-package log4cl-extras/appenders)


(define-global-var *debug-on-error* nil
"When T, then INVOKE-DEBUGGER will be called in case of any error during logging the message.")


(defclass dont-disable-mixin ()
())

Expand All @@ -31,4 +38,6 @@
"~@<Caught ~S ~:_~A ~_~
Unable to log the message.~:>"
(type-of condition) condition))
(when *debug-on-error*
(invoke-debugger condition))
:ignore)
13 changes: 13 additions & 0 deletions src/changelog.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,20 @@
":JSON"
":PLAIN"
"HTTP"
"ASDF"
"TRACEBACK-TO-STRING"))
(0.10.0 2023-11-19
"
## New
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.
## Fixes
* Package log4cl-extras now is created when library is loaded. This should fix a warning from ASDF about missing package.
")
(0.9.0 2022-12-30
"Function LOG4CL-EXTRAS/ERROR:PRINT-BACKTRACE now prints conditions with type like:
Expand Down
6 changes: 6 additions & 0 deletions src/core.lisp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
(uiop:define-package #:log4cl-extras
(:use #:cl)
(:nicknames #:log4cl-extras/core)
(:import-from #:log4cl-extras/config)
(:import-from #:log4cl-extras/error))
(in-package #:log4cl-extras)

0 comments on commit b1a12eb

Please sign in to comment.