Hi Piotr, Thanks for your response! I am using SBT build tool, and the JDK version is 17. And yes, I do see a `Log4jPlugins.dat` file in my JAR. I see some `log4j.core.appender` objects are included in this .dat file, however my new custom appender I added is not there.
Best, Amanda On Mon, Aug 5, 2024 at 7:08 AM Piotr P. Karwasz <piotr.karw...@gmail.com> wrote: > Hi Amanda, > > On Mon, 5 Aug 2024 at 15:23, Amanda Liu <as...@terpmail.umd.edu> wrote: > > Wondering if I'm missing some step of the set-up process for custom > > appenders? I thought that adding the appender class and modifying the > > log4j.properties file should be sufficient, as the plug-ins docs say > > "Serialized plugin listing files are generated by an annotation processor > > contained in the log4j-core artifact which will automatically scan your > > code for Log4j 2 plugins and output a metadata file in your processed > > classes. There is nothing extra that needs to be done to enable this; the > > Java compiler will automatically pick up the annotation processor on the > > class path unless you explicitly disable it" ( > > https://logging.apache.org/log4j/2.x/manual/plugins.html) > > Can you describe your setup: > > * What build tool (Maven, Gradle, etc.) are you using? > * What JDK are you using? > * Does your JAR file contain a `Log4jPlugins.dat` file? > > The `javac` compiler **usually** detects all the annotation processors > on the classpath (unless an annotation processor path is provided). > Build tools can however modify that and IIRC in future JDK release > annotation processors will need to be activated **explicitly**. > > Piotr >