Details
-
Question
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
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 it 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 created.
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.
Also there is already a asyncappender in my log4j2.xml and I am creating one via program. Will this cause a problem? I did this because I am currently unable to hook my programmatically created appender to the AsyncAppender defined in log4j2.xml.