Skip to content

Commit f784886

Browse files
committed
Update docs with a warning about logging of reserved keys when using structured arguments.
1 parent 70459e5 commit f784886

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

docs/core/logging.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,9 @@ To append additional keys in your logs, you can use the `StructuredArguments` cl
640640
}
641641
```
642642

643+
???+ warning "Warning"
644+
If the key name of your structured argument matches any of the [standard structured keys](#standard-structured-keys) or any of the [additional structured keys](#additional-structured-keys) the whole argument will be ignored. This is to protect you from accidentally overwriting reserved keys such as the log level or Lambda context information.
645+
643646
**Using MDC**
644647

645648
Mapped Diagnostic Context (MDC) is essentially a Key-Value store. It is supported by the [SLF4J API](https://www.slf4j.org/manual.html#mdc){target="_blank"},

0 commit comments

Comments
 (0)