Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.14.1
-
None
Description
This story aims to add a replacement parameter to ReadOnlyStringMapResolver (which is used by ThreadContextDataResolver and MapResolver) for modifying the keys of the map before resolving them. That is, given the following JSON template
{ "user": { "$resolver": "mdc", "pattern": "user:(.*)", "replacement": "$1" } }
A LogEvent with an MDC map composed of user:name, user:role, sessionId entries will generate the following JSON:
{ "user": { "name": "Paul Rubin", "role": "ADMIN" } }
Attachments
Attachments
Issue Links
- relates to
-
LOG4J2-3073 Issues using Lookup Plugin in Json Template Logging
-
- Closed
-