Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.14.0
Description
As reported by Magnus Kvalheim in a log4j2-logstash-layout issue, there is a request as follows:
With the message resolver it's possible to set the fallbackKey - an item to wishlist would be to be able to do the opposite. That is option to disregard SimpleMessage (as it's already printed in the message field.) Another option could be to use the mapresolver without specifying key?
If I understand the request right, making key directive optional (hence, one would be able to resolve the entire MapMessage) and adding a flatten directive (similar to the one in MDC resolver) can address this wish. That is,
config = [ key ] , [ stringified ] , [ flatten ] key = "key" -> string stringified = "stringified" -> boolean flatten = "flatten" -> ( boolean | flattenConfig ) flattenConfig = [ flattenPrefix ] flattenPrefix = "prefix" -> string
Attachments
Issue Links
- links to