Repository navigation
Commit 6429c14
authored
docs: Note that serializers run on child bindings at creation time (#2518)
Serializers are applied to the bindings passed to `logger.child()` when the
child logger is created, not on each subsequent log call. `asChindings()`
calls the matching serializer while building the child's precomputed
chindings string, so a serializer keyed to a binding runs exactly once.
This is intentional, and is what allows child loggers to stay fast at log
time, but it is surprising when a serializer is expected to run per log
call, and it was not documented.
Documents the behaviour and points readers at the log methods when they
need a serializer invoked per call.1 parent 6c71bc9 commit 6429c14
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
471 | 471 | | |
472 | 472 | | |
473 | 473 | | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
474 | 481 | | |
475 | 482 | | |
476 | 483 | | |
| |||
0 commit comments