Hello ! I've just discovered Log4J, and have already developed a Logger for my needs. I was surprised when I look at the documentation of the ASyncLog, and the problem of not seeing last logs when application exits, coz I had worked on the problem.
In my own Logger, I decided to limit IO operations, so every log arrives in a BufferedOutputStream with a buffer size of 2048. The Buffer is flushed when it is full, but I also have a DumperThread, which flushes the buffer every xxxx ms. Typicaly, every 5 seconds. For the looger being usable in a usual application and not only a server application, the thread has a maxIdleTime, so if there is no logs during too much time, the dumperThread dies, so if the application finishes (the dumper thread is the last thread remaining), it takes the maxIdle time to really finish. If the dumperThread is dead, and if other logs arrives, a new Thread is Build, an so on ... I'm really satisfied of the performances of this method, and I don't lose any log. I just wanted to present these ideas, and maybe have opinions :) Fabien B. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]