OPS4J Pax Logging

Introduction

Pax Logging is an implementation of OSGi Log Service API. Pax Logging 1.x releases implement OSGi org.osgi.service.log package in version 1.3 while Pax Logging 2.x releases will implement OSGi org.osgi.service.log package in version 1.4.

Not only pure OSGi logging API is implemented. Pax Logging hides the OSGi specific interfaces and mechanisms under popular Logging APIs. These include:

Developers writing their OSGi bundles have wide choice of Logging APIs to use. All the above are supported and relevant packages are exported from single pax-logging-api bundle.

At backend Pax Logging supports three actual Logging frameworks:

Each of the above is included in respective Pax Logging bundles: pax-logging-service, pax-logging-logback and pax-logging-log4j2. These bundles provide OSGi support for the above frameworks and allow their configuration through OSGi Configuration Admin API.

What's most important is that the choice of Logging API used by any bundle doesn't force developer to use particular Logging backend. For example, Log4j2 API can be used to call logging methods while the actual framework used to write the log statements may be Log4J1.

Latest News

Pax Logging 1.11.6 and 2.0.3 were released with Log4j2 upgrade to version 2.13.2 due to CVE-2020-9488: https://issues.apache.org/jira/browse/LOG4J2-2819

These releases do not contain any other changes.

Pax Logging 1.10.6 has been released where thanks to Monica Ron all discovered memory issues where solved (as proved by integration tests backported from 1.11.x) - thanks again!

Checkout the release notes Pax Logging 1.10.6 for more details.

Key Summary T Created Updated Due Assignee Reporter P Status Resolution
Loading...
Refresh

Pax Logging 2.0.2 has been released with one improvement. It can now be used without Configuration Admin while preserving all configuration methods.

Configuration page shows how to use Pax Logging without Configuration Admin and how to use org.ops4j.pax.logging.property.file system or bundle context property to specify actual Configuration file (for any of the backends).

Here’s a list of fixed JIRA issues:

Key Summary T Created Updated Due Assignee Reporter P Status Resolution
Loading...
Refresh

Pax Logging 2 Released!

Pax Logging team is proud to announce Pax Logging 2 release. Due to unforeseen shading problem, initial 2.0.0 release had JDK11 failure, so the Pax Logging 2 has version 2.0.1…

The most important feature of this release is support for OSGi R7 logging package (org.osgi.service.log version 1.4). Pax Logging itself was always more about using standard, non-OSGI specific facades to logging mechanisms, but now, standard org.osgi.service.log.Logger interface can be used as well.

This is new R7 way to use loggers:

org.osgi.framework.BundleContext context = ...;
ServiceReference<org.osgi.service.log.LoggerFactory> sr = context.getServiceReference(org.osgi.service.log.LoggerFactory.class);
org.osgi.service.log.LoggerFactory factory = context.getService(sr);
org.osgi.service.log.Logger log = factory.getLogger("my.logger");
log.info("INFO through R7 org.osgi.service.log.Logger");
log.audit("AUDIT through R7 org.osgi.service.log.Logger");

Just like Pax Logging 1.11.x, 2.x line comes with huge refactoring and unification of internal mechanism + more than 100 integration tests that were not present before 1.11.x.

OSGi R7 specification introduces two additional packages:

  • org.osgi.service.log.admin ( PAXLOGGING-267 - Getting issue details... STATUS )

  • org.osgi.service.log.stream( PAXLOGGING-268 - Getting issue details... STATUS )

These packages are not yet implemented by Pax Logging 2.0.1. Pax Logging exposes (that was one of initial design goals) configuration of underlying logging framework through Configuration Admin and org.osgi.service.log.admin is not straightforward to implement assuming this requirement. PAXLOGGING Jira issues for the above package implementations are the only issues left to be done (as of 2020-01-13).

Here’s full list of Jira issues resolved:

Key Summary T Created Assignee Reporter P Status Resolution
Loading...
Refresh

Pax Logging 1.10.5 has been released. It contains two bug fixes found by Monica Ron - thanks!

Checkout the release notes Pax Logging 1.10.5 for more details.

Key Summary T Created Assignee Reporter P Status
Loading...
Refresh

Pax Logging 1.11.4 has been released. It contains Log4j2 2.13.0 upgrade and several bug fixes. Additionally Log4j2 Structured Messages are supported out of the box.

Checkout the release notes Pax Logging 1.11.4 for more details.

Key Summary T Due Assignee Reporter P Status
Loading...
Refresh

The Pax Logging team is happy to announce the release of OPS4J Pax Logging 1.11.0.

This is a major new release with many improvements and refinements. Specially for the purpose of 1.11.0, new documentation was prepared and is available at https://ops4j1.jira.com/wiki/spaces/paxlogging/pages/499351646/Documentation and describes installation methods, internals, configuration details, etc.

The highlights of this release are:

  • Big refactoring of internal code, so all 3 backends use as least duplicate code as possible. There are lot of comments added explaining the rationale behind this refactoring.

  • Import and Export packages were reviewed and improved

  • More than 100 integration tests were added (comparing to 1 (one) available in 1.10.x)

  • Default/fallback logger was improved to provide reliable logging service in early stages of OSGi runtime

  • All shaded classes were reviewed and removed from source code of Pax Logging project if there were no changes against original versions. And the classes that were changed were changed again, but with better git diffability - so it’s now easier to port new changes to shaded classes

  • JBoss Logging is fully supported

  • Logging markers are supported

  • LocationInfo support is reliable - all logging APIs/facades may be used with location aware patterns (like %C, %L, %F)

  • MDC support for all supported frameworks

  • Lazy JDBC appender for Log4J2 which may use OSGi-registered javax.sql.DataSource

Karaf 4.2.7 will use new Pax Logging 1.11.0 as recorded in https://issues.apache.org/jira/browse/KARAF-6369 (all integration tests pass).

For more details, see the JIRA release notes.

As usual, all artifacts are available from Maven Central.

Key Summary T Created Updated Due Assignee Reporter P Status Resolution
Loading...
Refresh

The Pax Logging team is happy to announce the release of OPS4J Pax Logging 1.10.1.

This is a minor release with couple of bug fixes related to classloader memory leaks and log4j2.

For more details, see the JIRA release notes.

As usual, all artifacts are available from Maven Central

Key Summary T Created Updated Due Assignee Reporter P Status Resolution
Loading...
Refresh

The Pax Logging team is happy to announce the release of OPS4J Pax Logging 1.8.6.

This is a minor release with couple of bug fixes.

For more details, see the JIRA release notes below.

As usual, all artifacts are available from Maven Central

Key Summary T Created Updated Due Assignee Reporter P Status Resolution
Loading...
Refresh

The Pax Logging team is happy to announce the release of OPS4J Pax Logging 1.8.5.

This is a maintenance release with a number of improvements and bugfixes, especially around log4jv2 support.

For more details, see the JIRA release notes below.

As usual, all artifacts are available from Maven Central

Key Summary T Created Updated Due Assignee Reporter P Status Resolution
Loading...
Refresh

Pax Logging version 1.7.3 was released July 18 2014. This release is a bug fix release and minor improvements. See details.

Pax Logging version 1.7.2 was released January 28 2014. This release is a bug fix release. See details.

Pax Logging version 1.6.4 was released January 10 2012. This release is a bug fix release. See details.

Pax Logging version 1.6.3 was released today, June 29 2011. This release is a bug fix release. See details.

Pax Logging version 1.6.2 was released today, April 28 2011. This release is a bug fix release. See details.