• Post Reply Bookmark Topic Watch Topic
  • New Topic

Help with logging information from different threads  RSS feed

 
John Vorwald
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I log messages from different threads into different files. Can I do this using log4j?

Never mind, I used this example and will sort the output.
 
soundar rajan
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can use SLF4j MDC,MDC is set per thread. So each time a request is made to the server, we need to set MDC which can be acheived using Servet/Portlet filters.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!