[ 
https://issues.apache.org/jira/browse/LOG4J2-1023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14552306#comment-14552306
 ] 

Remko Popma commented on LOG4J2-1023:
-------------------------------------

For a general component, what would the rules be for selecting which log events 
to modify and which to leave alone? There are many options:  Marker, fully 
qualified logger class name, logger name, ThreadContext map entry... It is not 
at all clear to me which would be best for all use cases. 

Secondly, what level should the rewritten events have? Again, there are several 
options, from a fixed level for all events (as in the example), to a level 
based on a custom Marker or a ThreadContext map key, which allow per-event fine 
grained control over the resulting level. Again it would be hard to come up 
with a solution that would handle all use cases. 

The example shows how easy it is to accomplish this in a custom plugin.  To 
convince me this should be in core you'd need to address the above concerns. 


> New RewritePolicy for changing level of a log event
> ---------------------------------------------------
>
>                 Key: LOG4J2-1023
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1023
>             Project: Log4j 2
>          Issue Type: New Feature
>          Components: Core
>    Affects Versions: 2.3
>            Reporter: Mikael Ståldal
>              Labels: configuration
>
> It would be useful to have a RewritePolicy for changing the level of a log 
> event.
> Some 3rd party libraries log stuff on wrong level, and I would like to be 
> able to translate it.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to