I want to configure Sentry to to be working with log4j2.
To do that I need to add sentry appender to log4j2.xml file.
Actually it does not differ from configuring custom appender.
Manual page suggests that I need to add package with the appender to "packages" attribute of Configuration element:
My log4j2.xml file looks like this:
Package 'net.kencochrane.raven.log4j2' contains a class that extends 'org.apache.logging.log4j.core.appender.AbstractAppender'.
However, looks like it is completely ignored.
After some digging, I found out, that PluginManager uses already defined list of existing plugins, which is available within binary file (/log4j-core-2.0.jar!/META-INF/org/apache/logging/log4j/core/config/plugins/Log4j2Plugins.dat) and "packages" attribute actually doesnt do anything, becuase the only thing that XmlConfiguration does with its value is:
but the method is deprecated and empty:
As you can see, Javadoc points to PluginProcessor, which actually should create proper binary file based on Plugin annotation. However putting a breakpoint in 'process' method showed that it is not invoked during the log4j initialization.
Similar issue was already reported and resolved
but looks like problem came up again, and suggestes workaround dont work anymore.
What should I do to force PluginProcessor create Log4j2Plugins.dat file again?