You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "ppkarwasz (via GitHub)" <gi...@apache.org> on 2026/09/02 10:40:13 UTC

Re: [PR] Add literal Context Data (MDC) filtering to JSON Template Layout [logging-log4j2]

ppkarwasz commented on code in PR #4186:
URL: https://github.com/apache/logging-log4j2/pull/4186#discussion_r3913231846


##########
log4j-layout-template-json/src/main/resources/EcsLayout.json:
##########
@@ -26,7 +26,19 @@
   "labels": {
     "$resolver": "mdc",
     "flatten": true,
-    "stringified": true
+    "stringified": true,
+    "literal": {
+      "disallowed": [
+        "@timestamp",
+        "message",
+        "log.logger",
+        "log.level",
+        "event.dataset",
+        "process.thread.name",
+        "process.thread.id",
+        "ecs.version"
+      ]
+    }

Review Comment:
   Code looks good, but the naming for the configuration option seems odd. What about `filter` or `keyFilter`? The word `literal` doesn't tell me much, what this could do.
   
   ```json
   {
     "filter": {
       "includes": [
         "@timestamp",
         ...
       ]
     }
   }
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org