Skip to content

Commit

Permalink
Added documentation section on appenders.
Browse files Browse the repository at this point in the history
  • Loading branch information
svetlyak40wt committed Nov 19, 2023
1 parent 541e2ec commit 0010c85
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
20 changes: 20 additions & 0 deletions src/appenders.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
(:import-from #:log4cl)
(:import-from #:global-vars
#:define-global-var)
(:import-from #:40ants-doc
#:defsection)
(:export
#:stable-daily-file-appender
#:stable-this-console-appender
Expand Down Expand Up @@ -41,3 +43,21 @@
(when *debug-on-error*
(invoke-debugger condition))
:ignore)


(defsection @appenders (:title "Appenders"
:ignore-words (list "SOME-ERROR"))
"In case of errors, LOG4CL removes appender from the logger. After that log message will be lost.
I don't like this behaviour and prefer to see such errors in logs and to log other
messages. This library defines a special appender classes which are not removed on errors but
output this message instead: \"Caught SOME-ERROR: Error description - Unable to log the message.\".
When you use LOG4CL-EXTRAS/CONFIG:SETUP function it automatically uses these appenders.
To debug logging errors interactively, you can set *DEBUG-ON-ERROR* variable to T."
(stable-daily-file-appender class)
(stable-file-appender class)
(stable-this-console-appender class)
(dont-disable-mixin class)
(*debug-on-error* variable))
6 changes: 5 additions & 1 deletion src/doc.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#:@changelog)
(:import-from #:docs-config
#:docs-config)
(:import-from #:log4cl-extras/appenders
#:@appenders)
(:export
#:@index
#:@readme
Expand Down Expand Up @@ -56,7 +58,8 @@
(@configuration section)
(@context section)
(@errors section)
(@keeping-secrets section))
(@keeping-secrets section)
(@appenders section))


(defsection-copy @readme @index)
Expand All @@ -72,3 +75,4 @@ You can install this library from Quicklisp, but you want to receive updates qui
(ql:quickload :log4cl-extras)
```
""")

0 comments on commit 0010c85

Please sign in to comment.