Open mjiderhamn opened 8 years ago
@dhuygu
My log4j2 version is 2.3 (I want to upgrade 2.5 but there are some Log4JThread leaks in this version ) I am using log4j2 asynchronus loggers. Asynchronous Loggers internally use the lmax disruptor. I added log4j2.component.properties file to say log4j2 to use AsyncLoggerContextSelector: Log4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector. log4j2.xml file all my loggers are AsyncLogger and appenders are RollingRandomAccessFile. If you need additional data please ask.
Seems to be avoided by using a ShutdownCallbackRegistry as per http://stackoverflow.com/a/28835409.
See test case in commit https://github.com/mjiderhamn/classloader-leak-prevention/commit/a2783a09ebb64a1ccc5804f94507ca52f0e88bb6
Still need to look into version 2.5
See #40. @dhuygu :