Re: Thread-specific appenders

2007-10-18 Thread Curt Arnold
On Oct 16, 2007, at 10:40 PM, Aditya Prasad wrote: Three questions: 1) Is there an existing class I should be using instead? I don't think there is one that addresses your specific needs at this time. Probably over a year ago, there was a substantial amount of discussion on a multifile

Re: Thread-specific appenders

2007-10-17 Thread Aditya Prasad
Ah, yes, that was my first approach. But then it's more painful to watch them separately in real time, it requires more than a simple 'grep' if I have multi-line output (probably more work than the TLAppender class to write), and I wanted a 'slicker' solution :) Thanks! Aditya On 10/17/07, Paul

Re: Thread-specific appenders

2007-10-17 Thread Paul Smith
yep, but I have a 'simpler' implementation for you. If you're trying to seperate logs out by thread, do you _really_ need a file per thread? Couldn't each line in the log file simply contain the Thread's name via the PatternLayout's %t ? That way can visually distinguish logs relating to

Re: Thread-specific appenders

2007-10-16 Thread Aditya Prasad
Ah, the XML configuration syntax is much richer than in log4j.properties! That could be useful. I think your example makes sense, and would be useful in a more general setting. I may even end up mimicking it at some point. For my own project, I'm content with making it stick with a FileAppender

Re: Thread-specific appenders

2007-10-16 Thread Paul Smith
I started work on a Multiplexing Appender a while back that had a similar reason to exist (some people want files-per-level, for what reason I have no idea). I got stuck. Unfortunately there's no way in the configuration mechanism at the moment to register a 'factory' for appenders which i

Thread-specific appenders

2007-10-16 Thread Aditya Prasad
Hi all, I've written an appender that writes to different files based on the caller's thread id, but I'm not sure I've done it the best way. Here's my scenario: I have a JUnit test driver that runs about 50 tests from a suite. Because it takes too long to run them sequentially, and they're indepe