Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Mar 1, 2024
1 parent f7012ac commit 2895f00
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 44 deletions.
10 changes: 10 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

# ChangeLog

<a id="x-28LOG4CL-EXTRAS-2FCHANGELOG-3A-3A-7C0-2E11-2E0-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>

## 0.11.0 (2024-03-01)

<a id="changed"></a>

### Changed

Macro [`log4cl-extras/error:with-log-unhandled`][3fd6] 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.

<a id="x-28LOG4CL-EXTRAS-2FCHANGELOG-3A-3A-7C0-2E10-2E0-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>

## 0.10.0 (2023-11-19)
Expand Down
88 changes: 44 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Also, [`setup`][74de] allows to change log levels for different loggers:

<a id="x-28LOG4CL-EXTRAS-2FCONFIG-3ASETUP-20FUNCTION-29"></a>

### [function](6682) `log4cl-extras/config:setup` config
### [function](f4b2) `log4cl-extras/config:setup` config

Setup loggers and appenders via confg.

Expand Down Expand Up @@ -146,11 +146,11 @@ inside a package and other items are params for a nested [`setup`][74de] call.

<a id="x-28LOG4CL-EXTRAS-2FPLAIN-3APLAIN-LAYOUT-20CLASS-29"></a>

### [class](9c46) `log4cl-extras/plain:plain-layout` (layout)
### [class](0fa8) `log4cl-extras/plain:plain-layout` (layout)

<a id="x-28LOG4CL-EXTRAS-2FJSON-3AJSON-LAYOUT-20CLASS-29"></a>

### [class](31f4) `log4cl-extras/json:json-layout` (layout)
### [class](0b3f) `log4cl-extras/json:json-layout` (layout)

<a id="x-28LOG4CL-EXTRAS-2FCONTEXT-3A-3A-40CONTEXT-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>

Expand Down Expand Up @@ -189,7 +189,7 @@ CL-USER> (log4cl-extras/context:with-fields (:request-id 42)

<a id="x-28LOG4CL-EXTRAS-2FCONTEXT-3AWITH-FIELDS-20-2840ANTS-DOC-2FLOCATIVES-3AMACRO-29-29"></a>

### [macro](086c) `log4cl-extras/context:with-fields` (&rest fields) &body body
### [macro](8cbb) `log4cl-extras/context:with-fields` (&rest fields) &body body

Captures content of given fields into a dynamic variable.

Expand All @@ -198,7 +198,7 @@ inside the [`with-fields`][b464] body.

<a id="x-28LOG4CL-EXTRAS-2FCONTEXT-3AGET-FIELDS-20FUNCTION-29"></a>

### [function](35b5) `log4cl-extras/context:get-fields`
### [function](6b14) `log4cl-extras/context:get-fields`

Returns an alist of all fields defined using [`with-fields`][b464] macro in the current stack.

Expand Down Expand Up @@ -302,19 +302,19 @@ how to not log secret values.

<a id="x-28LOG4CL-EXTRAS-2FERROR-3A-2AMAX-TRACEBACK-DEPTH-2A-20-28VARIABLE-29-29"></a>

### [variable](e678) `log4cl-extras/error:*max-traceback-depth*` 10
### [variable](bdba) `log4cl-extras/error:*max-traceback-depth*` 10

Keeps default value for traceback depth logged by [`with-log-unhandled`][3fd6] macro

<a id="x-28LOG4CL-EXTRAS-2FERROR-3A-2AMAX-CALL-LENGTH-2A-20-28VARIABLE-29-29"></a>

### [variable](47bf) `log4cl-extras/error:*max-call-length*` 100
### [variable](3584) `log4cl-extras/error:*max-call-length*` 100

The max length of each line in a traceback. It is useful to limit it because otherwise some log collectors can discard the whole log entry.

<a id="x-28LOG4CL-EXTRAS-2FERROR-3A-2AARGS-FILTERS-2A-20-28VARIABLE-29-29"></a>

### [variable](e8ce) `log4cl-extras/error:*args-filters*` nil
### [variable](f219) `log4cl-extras/error:*args-filters*` nil

Add to this variable functions of two arguments to change arguments before they will be dumped
as part of the backtrace to the log.
Expand All @@ -324,7 +324,7 @@ from multiple threads.

<a id="x-28LOG4CL-EXTRAS-2FERROR-3A-2AARGS-FILTER-CONSTRUCTORS-2A-20-28VARIABLE-29-29"></a>

### [variable](7b89) `log4cl-extras/error:*args-filter-constructors*` nil
### [variable](8565) `log4cl-extras/error:*args-filter-constructors*` nil

Add to this variable functions of zero arguments. Each function should return an argument filter
function suitable for using in the [`*args-filters*`][c7a0] variable.
Expand All @@ -338,7 +338,7 @@ In this case it will create a new secret replacer for every backtrace to be proc

<a id="x-28LOG4CL-EXTRAS-2FERROR-3AWITH-LOG-UNHANDLED-20-2840ANTS-DOC-2FLOCATIVES-3AMACRO-29-29"></a>

### [macro](4e9e) `log4cl-extras/error:with-log-unhandled` (&key (depth \*max-traceback-depth\*) (errors-to-ignore nil)) &body body
### [macro](ad1d) `log4cl-extras/error:with-log-unhandled` (&key (depth \*max-traceback-depth\*) (errors-to-ignore nil)) &body body

Logs any `ERROR` condition signaled from the body. Logged message will have a "traceback" field.

Expand All @@ -347,7 +347,7 @@ Errors matching (typep err <each-of errors-to-ignore>) will not be logged as "Un

<a id="x-28LOG4CL-EXTRAS-2FERROR-3APRINT-BACKTRACE-20FUNCTION-29"></a>

### [function](d24c) `log4cl-extras/error:print-backtrace` &key (stream \*debug-io\*) (condition nil) (depth \*max-traceback-depth\*) (max-call-length \*max-call-length\*) (args-filters (get-current-args-filters)) (format-condition #'format-condition-object)
### [function](3063) `log4cl-extras/error:print-backtrace` &key (stream \*debug-io\*) (condition nil) (depth \*max-traceback-depth\*) (max-call-length \*max-call-length\*) (args-filters (get-current-args-filters)) (format-condition #'format-condition-object)

A helper to print backtrace. Could be useful to out backtrace
at places other than logs, for example at a web page.
Expand All @@ -364,7 +364,7 @@ function of two arguments: `(stream condition)`.

<a id="x-28LOG4CL-EXTRAS-2FERROR-3AMAKE-ARGS-FILTER-20FUNCTION-29"></a>

### [function](b924) `log4cl-extras/error:make-args-filter` predicate placeholder
### [function](15db) `log4cl-extras/error:make-args-filter` predicate placeholder

Returns a function, suitable to be used in [`*args-filters*`][c7a0] variable.

Expand All @@ -373,7 +373,7 @@ and if it returns T, then argument will be replaced with `PLACEHOLDER`.

<a id="x-28LOG4CL-EXTRAS-2FERROR-3APLACEHOLDER-20CLASS-29"></a>

### [class](2f46) `log4cl-extras/error:placeholder` ()
### [class](3c60) `log4cl-extras/error:placeholder` ()

Objects of this class can be used as replacement to arguments in a backtrace.

Expand All @@ -385,7 +385,7 @@ Placeholders should be created with [`make-placeholder`][de65] function.

<a id="x-28LOG4CL-EXTRAS-2FERROR-3AMAKE-PLACEHOLDER-20FUNCTION-29"></a>

### [function](80e3) `log4cl-extras/error:make-placeholder` name
### [function](ae19) `log4cl-extras/error:make-placeholder` name

Creates a placeholder for some secret value or omitted argument.

Expand All @@ -399,11 +399,11 @@ placeholders to remove sensitive information from logs.

<a id="x-28LOG4CL-EXTRAS-2FERROR-3APLACEHOLDER-P-20FUNCTION-29"></a>

### [function](761f) `log4cl-extras/error:placeholder-p` obj
### [function](ed1f) `log4cl-extras/error:placeholder-p` obj

<a id="x-28LOG4CL-EXTRAS-2FERROR-3APLACEHOLDER-NAME-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-20LOG4CL-EXTRAS-2FERROR-3APLACEHOLDER-29-29"></a>

### [reader](0986) `log4cl-extras/error:placeholder-name` (placeholder) (:name)
### [reader](14db) `log4cl-extras/error:placeholder-name` (placeholder) (:name)

<a id="x-28LOG4CL-EXTRAS-2FSECRETS-3A-3A-40KEEPING-SECRETS-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>

Expand Down Expand Up @@ -707,7 +707,7 @@ CL-USER> (setf log4cl-extras/error:*args-filters*
```
<a id="x-28LOG4CL-EXTRAS-2FSECRETS-3AMAKE-SECRETS-REPLACER-20FUNCTION-29"></a>

### [function](d395) `log4cl-extras/secrets:make-secrets-replacer`
### [function](1da5) `log4cl-extras/secrets:make-secrets-replacer`

Returns a function which can be used to filter backtrace arguments.

Expand All @@ -734,23 +734,23 @@ To debug logging errors interactively, you can set [`*debug-on-error*`][8400] va

<a id="x-28LOG4CL-EXTRAS-2FAPPENDERS-3ASTABLE-DAILY-FILE-APPENDER-20CLASS-29"></a>

### [class](eb80) `log4cl-extras/appenders:stable-daily-file-appender` (dont-disable-mixin daily-file-appender)
### [class](eb24) `log4cl-extras/appenders:stable-daily-file-appender` (dont-disable-mixin daily-file-appender)

<a id="x-28LOG4CL-EXTRAS-2FAPPENDERS-3ASTABLE-FILE-APPENDER-20CLASS-29"></a>

### [class](1e10) `log4cl-extras/appenders:stable-file-appender` (dont-disable-mixin file-appender)
### [class](330c) `log4cl-extras/appenders:stable-file-appender` (dont-disable-mixin file-appender)

<a id="x-28LOG4CL-EXTRAS-2FAPPENDERS-3ASTABLE-THIS-CONSOLE-APPENDER-20CLASS-29"></a>

### [class](fd11) `log4cl-extras/appenders:stable-this-console-appender` (dont-disable-mixin this-console-appender)
### [class](40f3) `log4cl-extras/appenders:stable-this-console-appender` (dont-disable-mixin this-console-appender)

<a id="x-28LOG4CL-EXTRAS-2FAPPENDERS-3ADONT-DISABLE-MIXIN-20CLASS-29"></a>

### [class](e098) `log4cl-extras/appenders:dont-disable-mixin` ()
### [class](351b) `log4cl-extras/appenders:dont-disable-mixin` ()

<a id="x-28LOG4CL-EXTRAS-2FAPPENDERS-3A-2ADEBUG-ON-ERROR-2A-20-28VARIABLE-29-29"></a>

### [variable](4f44) `log4cl-extras/appenders:*debug-on-error*` nil
### [variable](345d) `log4cl-extras/appenders:*debug-on-error*` nil

When T, then `INVOKE-DEBUGGER` will be called in case of any error during logging the message.

Expand All @@ -773,28 +773,28 @@ When T, then `INVOKE-DEBUGGER` will be called in case of any error during loggin
[bb11]: https://40ants.com/log4cl-extras/#x-28LOG4CL-EXTRAS-2FSECRETS-3AMAKE-SECRETS-REPLACER-20FUNCTION-29
[8f00]: https://github.com/40ants/log4cl-extras
[b509]: https://github.com/40ants/log4cl-extras/actions
[4f44]: https://github.com/40ants/log4cl-extras/blob/34caa29c54681b20fb5cd468f6285e0e96f0749d/src/appenders.lisp#L17
[e098]: https://github.com/40ants/log4cl-extras/blob/34caa29c54681b20fb5cd468f6285e0e96f0749d/src/appenders.lisp#L21
[fd11]: https://github.com/40ants/log4cl-extras/blob/34caa29c54681b20fb5cd468f6285e0e96f0749d/src/appenders.lisp#L25
[eb80]: https://github.com/40ants/log4cl-extras/blob/34caa29c54681b20fb5cd468f6285e0e96f0749d/src/appenders.lisp#L29
[1e10]: https://github.com/40ants/log4cl-extras/blob/34caa29c54681b20fb5cd468f6285e0e96f0749d/src/appenders.lisp#L33
[6682]: https://github.com/40ants/log4cl-extras/blob/34caa29c54681b20fb5cd468f6285e0e96f0749d/src/config.lisp#L211
[35b5]: https://github.com/40ants/log4cl-extras/blob/34caa29c54681b20fb5cd468f6285e0e96f0749d/src/context.lisp#L62
[086c]: https://github.com/40ants/log4cl-extras/blob/34caa29c54681b20fb5cd468f6285e0e96f0749d/src/context.lisp#L78
[e678]: https://github.com/40ants/log4cl-extras/blob/34caa29c54681b20fb5cd468f6285e0e96f0749d/src/error.lisp#L152
[47bf]: https://github.com/40ants/log4cl-extras/blob/34caa29c54681b20fb5cd468f6285e0e96f0749d/src/error.lisp#L155
[e8ce]: https://github.com/40ants/log4cl-extras/blob/34caa29c54681b20fb5cd468f6285e0e96f0749d/src/error.lisp#L158
[7b89]: https://github.com/40ants/log4cl-extras/blob/34caa29c54681b20fb5cd468f6285e0e96f0749d/src/error.lisp#L166
[d24c]: https://github.com/40ants/log4cl-extras/blob/34caa29c54681b20fb5cd468f6285e0e96f0749d/src/error.lisp#L289
[4e9e]: https://github.com/40ants/log4cl-extras/blob/34caa29c54681b20fb5cd468f6285e0e96f0749d/src/error.lisp#L367
[2f46]: https://github.com/40ants/log4cl-extras/blob/34caa29c54681b20fb5cd468f6285e0e96f0749d/src/error.lisp#L385
[0986]: https://github.com/40ants/log4cl-extras/blob/34caa29c54681b20fb5cd468f6285e0e96f0749d/src/error.lisp#L386
[80e3]: https://github.com/40ants/log4cl-extras/blob/34caa29c54681b20fb5cd468f6285e0e96f0749d/src/error.lisp#L404
[761f]: https://github.com/40ants/log4cl-extras/blob/34caa29c54681b20fb5cd468f6285e0e96f0749d/src/error.lisp#L419
[b924]: https://github.com/40ants/log4cl-extras/blob/34caa29c54681b20fb5cd468f6285e0e96f0749d/src/error.lisp#L423
[31f4]: https://github.com/40ants/log4cl-extras/blob/34caa29c54681b20fb5cd468f6285e0e96f0749d/src/json.lisp#L54
[9c46]: https://github.com/40ants/log4cl-extras/blob/34caa29c54681b20fb5cd468f6285e0e96f0749d/src/plain.lisp#L77
[d395]: https://github.com/40ants/log4cl-extras/blob/34caa29c54681b20fb5cd468f6285e0e96f0749d/src/secrets.lisp#L357
[345d]: https://github.com/40ants/log4cl-extras/blob/f7012acbdb52701ff2657c9a4296f44f84a9ddf8/src/appenders.lisp#L17
[351b]: https://github.com/40ants/log4cl-extras/blob/f7012acbdb52701ff2657c9a4296f44f84a9ddf8/src/appenders.lisp#L21
[40f3]: https://github.com/40ants/log4cl-extras/blob/f7012acbdb52701ff2657c9a4296f44f84a9ddf8/src/appenders.lisp#L25
[eb24]: https://github.com/40ants/log4cl-extras/blob/f7012acbdb52701ff2657c9a4296f44f84a9ddf8/src/appenders.lisp#L29
[330c]: https://github.com/40ants/log4cl-extras/blob/f7012acbdb52701ff2657c9a4296f44f84a9ddf8/src/appenders.lisp#L33
[f4b2]: https://github.com/40ants/log4cl-extras/blob/f7012acbdb52701ff2657c9a4296f44f84a9ddf8/src/config.lisp#L211
[6b14]: https://github.com/40ants/log4cl-extras/blob/f7012acbdb52701ff2657c9a4296f44f84a9ddf8/src/context.lisp#L62
[8cbb]: https://github.com/40ants/log4cl-extras/blob/f7012acbdb52701ff2657c9a4296f44f84a9ddf8/src/context.lisp#L78
[bdba]: https://github.com/40ants/log4cl-extras/blob/f7012acbdb52701ff2657c9a4296f44f84a9ddf8/src/error.lisp#L152
[3584]: https://github.com/40ants/log4cl-extras/blob/f7012acbdb52701ff2657c9a4296f44f84a9ddf8/src/error.lisp#L155
[f219]: https://github.com/40ants/log4cl-extras/blob/f7012acbdb52701ff2657c9a4296f44f84a9ddf8/src/error.lisp#L158
[8565]: https://github.com/40ants/log4cl-extras/blob/f7012acbdb52701ff2657c9a4296f44f84a9ddf8/src/error.lisp#L166
[3063]: https://github.com/40ants/log4cl-extras/blob/f7012acbdb52701ff2657c9a4296f44f84a9ddf8/src/error.lisp#L289
[ad1d]: https://github.com/40ants/log4cl-extras/blob/f7012acbdb52701ff2657c9a4296f44f84a9ddf8/src/error.lisp#L368
[3c60]: https://github.com/40ants/log4cl-extras/blob/f7012acbdb52701ff2657c9a4296f44f84a9ddf8/src/error.lisp#L386
[14db]: https://github.com/40ants/log4cl-extras/blob/f7012acbdb52701ff2657c9a4296f44f84a9ddf8/src/error.lisp#L387
[ae19]: https://github.com/40ants/log4cl-extras/blob/f7012acbdb52701ff2657c9a4296f44f84a9ddf8/src/error.lisp#L405
[ed1f]: https://github.com/40ants/log4cl-extras/blob/f7012acbdb52701ff2657c9a4296f44f84a9ddf8/src/error.lisp#L420
[15db]: https://github.com/40ants/log4cl-extras/blob/f7012acbdb52701ff2657c9a4296f44f84a9ddf8/src/error.lisp#L424
[0b3f]: https://github.com/40ants/log4cl-extras/blob/f7012acbdb52701ff2657c9a4296f44f84a9ddf8/src/json.lisp#L54
[0fa8]: https://github.com/40ants/log4cl-extras/blob/f7012acbdb52701ff2657c9a4296f44f84a9ddf8/src/plain.lisp#L77
[1da5]: https://github.com/40ants/log4cl-extras/blob/f7012acbdb52701ff2657c9a4296f44f84a9ddf8/src/secrets.lisp#L357
[d7d4]: https://github.com/40ants/log4cl-extras/issues
[d1aa]: https://github.com/fukamachi/lack/
[2c00]: https://quickdocs.org/40ants-doc
Expand Down

0 comments on commit 2895f00

Please sign in to comment.