0

I want to implement a custom plugin with Log4j2 with ops4j-pax-logging but the Log4j2Plugins.dat is not getting created. When I use just Log4j2 it gets created with no issue.

Asma Zinneera Jabir
  • 801
  • 3
  • 13
  • 31

1 Answers1

0

This was fixed by adding the plugin-processor in the pom.

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.1</version>
            <executions>
                <execution>
                    <id>log4j-plugin-processor</id>
                    <goals>
                        <goal>compile</goal>
                    </goals>
                    <phase>process-classes</phase>
                    <configuration>
                        <proc>only</proc>
                        <annotationProcessors>
                            <annotationProcessor>org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor</annotationProcessor>
                        </annotationProcessors>
                    </configuration>
                </execution>
            </executions>
        </plugin>
Asma Zinneera Jabir
  • 801
  • 3
  • 13
  • 31