I am working on an application that uses a lot of Worker threads to work on content. Each of these Threads is supposed to write to its own log file, following a specific naming convention, mainly dependent on one String value that each thread gets passed in at creation time.
I have found no way of doing this with log4j that does not involve writing all possible appenders to the log4j configuration at compile time. This is hardly acceptable for my application. The project already contains a lot of references to a Logger object which I do not wish to rewrite.
So far I've started writing a class that implements Logger but the cast from MyLogger to Logger does not go through. Changing the references from Logger to MyLogger isn't exactly rocket science but I had hoped to stay very close to log4j in my implementation.
Is there an easier way to do this with log4j? If not - does anyone have a how-to or tutorial on how to write you own logging implementation?