logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zze-pegase balg011 Bancharel Fabien DvSI/SIReS/GRE <pegase.balg...@rd.francetelecom.com>
Subject new to log4j
Date Tue, 23 Oct 2001 11:59:21 GMT
Hello !

I've just discovered Log4J, and have already developed a Logger for my
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
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: log4j-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-dev-help@jakarta.apache.org

View raw message