[logback-user] MDC.clear() invoked in child class deletes parent keys

yihtserns sim_yihtsern at yahoo.com
Wed Feb 10 14:53:38 UTC 2016


Kuu wrote
> MDC.put("key2")
> ... some logic....
> finally{
>     MDC.clear();
> }

I thought the normal way is to _only_ clear the key(s) you put in:
```
MDC.put("key2")
... some logic....
finally{
    MDC.remove("key2");
}
```




--
View this message in context: http://logback.10977.n7.nabble.com/MDC-clear-invoked-in-child-class-deletes-parent-keys-tp14514p14519.html
Sent from the Users mailing list archive at Nabble.com.


More information about the logback-user mailing list