[ 
https://issues.apache.org/jira/browse/LOG4J2-3034?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Caleb Cushing updated LOG4J2-3034:
----------------------------------
    Description: I'm not talking about `patternSelector`, I thought that was 
what I wanted, but I didn't understand it, I think. What I'm talking about is, 
if my root current active level is, for example,  `error`, I want a format 
without MDC, if it's `debug` I want a format with MDC. meaning in error level, 
and all levels I would want the MDC when my lowest level is `debug` or trace. 
If it's higher than debug I want no MDC in my output. Pretty sure this is 
relatively easy to achieve with a programmatic configuration, but not without. 
The use case is to get far more verbose logging when debugging as opposed to 
normal "production" mode.  (was: I'm not talking about `patternSelector`, I 
thought that was what I wanted, but I didn't understand it, I think. What I'm 
talking about is, if my root current active level is, for example,  `error`, I 
want a format without MDC, if it's `debug` I want a format with MDC. meaning in 
error level, and all levels I would want the MDC when my lowest level is 
`debug` or trace. If it's higher than debug I want no MDC in my output. Pretty 
sure this is relatively easy to achieve with a programmatic configuration, but 
not without.)

> Change Log format based on currently active level
> -------------------------------------------------
>
>                 Key: LOG4J2-3034
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-3034
>             Project: Log4j 2
>          Issue Type: New Feature
>            Reporter: Caleb Cushing
>            Priority: Major
>
> I'm not talking about `patternSelector`, I thought that was what I wanted, 
> but I didn't understand it, I think. What I'm talking about is, if my root 
> current active level is, for example,  `error`, I want a format without MDC, 
> if it's `debug` I want a format with MDC. meaning in error level, and all 
> levels I would want the MDC when my lowest level is `debug` or trace. If it's 
> higher than debug I want no MDC in my output. Pretty sure this is relatively 
> easy to achieve with a programmatic configuration, but not without. The use 
> case is to get far more verbose logging when debugging as opposed to normal 
> "production" mode.



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

Reply via email to