Components
Due to Tomcat’s complex classloader architecture (cf. Class Loader How-TO), the Copernik.eu extensions for Log4j and Tomcat has been split into three artifacts. This way each of them can be deployed in a different classloader:
-
The
tomcat-juli-to-log4j
artifact needs to be in the same classloader astomcat-juli
: the system classloader. -
The
tomcat-log4j
artifact needs to be in the same classloader as the Tomcat server classes: the common or server classloaders. -
The
log4j-tomcat
artifact needs to be in the same classloader as Log4j Core. Depending on the deployment, this might be the system, common or webapp classloader.
tomcat-juli-to-log4j
The tomcat-juli-to-log4j
artifact provides a bridge between Tomcat JUL and Log4j API.
See Tomcat JULI to Log4j API bridge for more details.
-
Maven
-
Gradle
<dependency>
<groupId>eu.copernik</groupId>
<artifactId>tomcat-juli-to-log4j</artifactId>
<version>3.0.0-beta1</version>
</dependency>
implementation 'eu.copernik:tomcat-juli-to-log4j:3.0.0-beta1'
tomcat-log4j
The tomcat-log4j
artifact provides Tomcat components that improve its usage with Log4j.
See Tomcat components for more details.
-
Maven
-
Gradle
<dependency>
<groupId>eu.copernik</groupId>
<artifactId>tomcat-log4j</artifactId>
<version>3.0.0-beta1</version>
</dependency>
implementation 'eu.copernik:tomcat-log4j:3.0.0-beta1'
log4j-tomcat
The log4j-tomcat
artifact provides Log4j Core plugins that extend the possibility of the logging backend by providing Tomcat-specific functionalities.
See Log4j Core Plugins for more details.
-
Maven
-
Gradle
<dependency>
<groupId>eu.copernik</groupId>
<artifactId>log4j-tomcat</artifactId>
<version>3.0.0-beta1</version>
</dependency>
implementation 'eu.copernik:log4j-tomcat:3.0.0-beta1'