logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sudharma Puranik <sudharma.pura...@gmail.com>
Subject Multiple thread creation problem with AsyncAppender
Date Thu, 18 Jul 2013 15:31:13 GMT
I have a log4j2.xml configuration file from which I am getting the Logger,
attached is the snapshot. when my logger is created a new thread is created.

Programmatically,I create a RollingFileAppender and attach the same to
AsyncAppender . I attach the Async Appender to the configuration of the
log4j.xml, And when I start the Async Appender again a new thread is

The problem now is that both the threads are writing to my async appender
so for a 5 lakh line log, I get 10 lakh lines because each thread is
writing the log.

Is this a bug? because I get a logger a new thread is generated and when I
create a async appender another thread is created and both are doing the
same job.


View raw message