[logback-user] Separate log files for different threads

Cyber Jack cyberjack at live.co.uk
Sun Oct 10 14:38:50 CEST 2010


Hello,

I am wondering if it is possible to separate logging based on thread names? I would like logs generated by every thread to go into distinct log files, one log file per thread e.g FILE-${thread}.log. I know that I can have all threads write to a single log file and then grep on thread name, but want to know if there is a better approach.

I have tried SiftingAppender and put the thread name into the MDC in each thread, but it didn't work.

Thanks
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://qos.ch/pipermail/logback-user/attachments/20101010/16d82a7f/attachment.html>


More information about the Logback-user mailing list