You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Raman Gupta (Jira)" <ji...@apache.org> on 2021/07/05 13:20:00 UTC

[jira] [Created] (LOG4J2-3119) Create a SubstitutionResolver for JsonTemplateLayout

Raman Gupta created LOG4J2-3119:
-----------------------------------

             Summary: Create a SubstitutionResolver for JsonTemplateLayout
                 Key: LOG4J2-3119
                 URL: https://issues.apache.org/jira/browse/LOG4J2-3119
             Project: Log4j 2
          Issue Type: Improvement
          Components: JsonTemplateLayout
            Reporter: Raman Gupta


A "SubstitutionResolver" ​for JsonTemplateLayout would be useful.

This resolver would be combined with another resolver, and would allow for "mapping" values output by another resolver to different values.

For example, a SubstitutionResolver could map a level resolver output from WARN to WARNING.

A simple text mapping (perhaps with a case-insensitive flag), with pass-through for unsubstituted values, would probably be the best approach. More complicated scenarios could be addressed with another resolver e.g. RegexReplaceResolver.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)