Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
372 views

MDC not logged when using SLF4J and Log4J2

I'm trying to log MDC using a json formatter in a Wildfly application. I'm hoping to see all of the MDC keys and their values in each of the logs after setting the MDC values. I don't want to use ...
user1022022's user avatar
1 vote
1 answer
469 views

How to setup logger file which ignore the value put in MDC

I have a scenario where I need to put the value in sl4j.MDC.put("Authorization",(bearer token)). As,it's a thread safe I need to pass it to downstream API in headers. But now the issue is the value is ...
abhishek chauhan's user avatar
9 votes
4 answers
6k views

How to set a default value against an MDC key in log4j 2?

As in log4j we have an option to set a default value against an MDC key like this - mdc{key:-defaultVal} Do we have something similar in log4j 2 ?
Tanmoy's user avatar
  • 1,399