That might be a solution. But is it possible to configure "dynamic" categories so that for each "username" I'll get a separate logfile (like "username".log)? Another question: when I implement this approach I get a Logger for each user (and for each class that needs a Logger). When many users access my server I have many Loggers that won't be used any longer when the user disconnects from ther server. Is there a way to discard a Logger? I don't want to have to reboot my server every few days because it runs out of memory (since the JVM contains a lot of unused Loggers). Perhaps writing a thread aware appender that splits the LoggingEvents by the Logger name into different logs might be a solution? Or is log4j not the right solution for the usecase described below?
-----Urspr�ngliche Nachricht----- Von: James Stauffer [mailto:[EMAIL PROTECTED] Gesendet: Montag, 4. April 2005 14:37 An: Log4J Users List Betreff: Re: Generate Protocols with Log4J You may find that creating a logger per user would work for you. Logger logger = Logger.getLogger(username + "." + getClass().getName()); On Apr 4, 2005 7:35 AM, Weseloh, Markus <[EMAIL PROTECTED]> wrote: > Hallo, > > I'm writing a client-server application where the client sends a > request to the server and the server starts a complex process. This > process has to generate a protocol that can be stored in a database or > send to an email address. I would like to generate this protocol with > log4j but I don't exactly know how to do it. The protocol is client > request specific so there is not one or more logfiles for the whole > server, but one logfile for each client request. Of course multiple > clients can access the server at the same time. Is there a "best practice" to implement this behaviour? > > Markus Weseloh > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- James Stauffer Are you good? Take the test at http://www.livingwaters.com/good/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
