You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/core/logging.md
+11-3Lines changed: 11 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -378,9 +378,17 @@ You can use Powertools for AWS Lambda Logging with either the `@Logging` annotat
378
378
}
379
379
```
380
380
381
-
???+ warning "SLF4J Fluent Logging API"
382
-
When using [SLF4J Fluent Logging API](https://www.slf4j.org/manual.html#fluent) **do not add reserved keys** listed in [standard structured keys](#standard-structured-keys) and [additional structured keys](#additional-structured-keys) as key-value pairs via `addKeyValue`.
383
-
This may cause unindented behavior.
381
+
???+ warning "Do not reuse reserved keys"
382
+
383
+
Do not reuse reserved keys listed in [standard structured keys](#standard-structured-keys) and [additional structured keys](#additional-structured-keys).
384
+
This restriction applies to all structured logging mechanisms, including:
385
+
386
+
- Log arguments
387
+
- MDC entries
388
+
- `addKeyValue(...)`or `addArgument(...)` of [SLF4J Fluent Logging API](https://www.slf4j.org/manual.html#fluent)
389
+
- Any other structured data fields
390
+
391
+
Reusing reserved keys in any of these contexts may result in unintended or inconsistent behavior.
Copy file name to clipboardExpand all lines: powertools-logging/powertools-logging-logback/src/main/java/software/amazon/lambda/powertools/logging/logback/JsonUtils.java
Copy file name to clipboardExpand all lines: powertools-logging/powertools-logging-logback/src/main/java/software/amazon/lambda/powertools/logging/logback/LambdaEcsEncoder.java
Copy file name to clipboardExpand all lines: powertools-logging/powertools-logging-logback/src/main/java/software/amazon/lambda/powertools/logging/logback/LambdaJsonEncoder.java
+4-8Lines changed: 4 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -79,12 +79,11 @@ public byte[] encode(ILoggingEvent event) {
Copy file name to clipboardExpand all lines: powertools-logging/powertools-logging-logback/src/test/java/software/amazon/lambda/powertools/logging/internal/LambdaEcsEncoderTest.java
Copy file name to clipboardExpand all lines: powertools-logging/powertools-logging-logback/src/test/java/software/amazon/lambda/powertools/logging/internal/LambdaJsonEncoderTest.java
0 commit comments