Download

There’s no single artifact that should be downloaded. Entire Pax Logging is available from Maven Central repository.

Setup Maven

In order to use Pax Logging in your pom.xml, you have to add this dependency:

 

<dependency> <groupId>org.ops4j.pax.logging</groupId> <artifactId>pax-logging-api</artifactId> <version>1.11.0</version> </dependency>

Depending on the logging backend of choice, you may have to add one of the below dependencies:

<dependency> <groupId>org.ops4j.pax.logging</groupId> <artifactId>pax-logging-service</artifactId> <version>1.11.0</version> </dependency> <dependency> <groupId>org.ops4j.pax.logging</groupId> <artifactId>pax-logging-logback</artifactId> <version>1.11.0</version> </dependency> <dependency> <groupId>org.ops4j.pax.logging</groupId> <artifactId>pax-logging-log4j2</artifactId> <version>1.11.0</version> </dependency>

Using Pax Logging in Karaf

Explicit dependency on one of Pax Logging artifacts, especially on particular logging backend is not usual. Typically, user’s pom.xml contains simply dependency to logging API of choice. For example Slf4J. Pax Logging should be provided and installed inside the OSGi runtime of choice.

For example in plain Felix distribution it’s enough to drop pax-logging-api and one of logging backends to directory indicated by felix.auto.deploy.dir property.

In Apache Karaf, Pax Logging bundles are provided by default on official distribution (both apache-karaf and apache-karaf-minimal) and are declared in etc/system.properties. Even when creating custom Karaf distribution, Pax Logging bundles are availeble via default framework feature that’s used by default KAR when constructing custom distribution.