logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kamal C <kamaltar...@gmail.com>
Subject How to disable Serialized plugin listing files on classpath - Initialization slowness
Date Fri, 05 Sep 2014 06:46:05 GMT
During my testing Log4j 2 takes considerable amount of time to initialize.
In my log4j2.XML, i have around 40 Rolling file appenders and a console
appender. It took 22-25 seconds to initialize all of them. I have seen them
by turning on TRACE level logs.

I had gone through Log4j2 docs, they said PluginManager looks for custom
plugins in the class-path and the packages in the configuration of
log4j2.xml. I gave my required packages to look for custom plugins in

To disable seriailzed listing of files , during my compilation time i run
the following command

javac -d . -cp "MY_CLASSPATH" -proc:only -processor
org.apache.logging.log4j.core.config.plugins.processor *.java

It created a META-INF folder in my class-path which it contains one
Log4j2Plugins.dat file. Then i started my testing, even then it takes 20-22
seconds to initialize. How should i minimize the initialization time?

Any help would be greatly appreciated.

Kamal. C

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message