Hi 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 configuration. 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. Thanks, Kamal. C