Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

TOMCAT valve/global-filter setting MDC

 
Veeresh Hubballi
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to set MDC values in a global filter/Custom Valve.

MDC.put("user","testuser")

Why i am not able to see tha same getting appended in the logs.
I have included [%X{user}].But i get empty([]) in my logs.

And more over MDC.class.hashCode() in the valve/global filter and in servlet are showing different values even though Thread.currentThread().getname() is same.



 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic