[log4j] LoggingEvent is not a part of pax-logging-api

Description

pax-logging-api exports the org.apache.log4j.spi package but LoggingEvent class placed at pax-logging-service and cause
java.lang.ClassNotFoundException: org.apache.log4j.spi.LoggingEvent
Workaround is to use
<Private-Package>org.apache.log4j.spi,
but LoggingEvent class is expected to be visible at runtime

Environment

None

Activity

Show:
Guillaume Nodet
March 31, 2017, 11:49 AM

What's your use case exactly ?
If you're implementing a custom appender or something like that, the usual way to do that is to attach your code as an OSGi fragment to the pax-logging-service bundle. In such a case, the class will be visible to your code.

Alexey Markevich
March 31, 2017, 12:02 PM

Bundle reads org.apache.log4j.spi.LoggingEvent from external source; logic is not related to pax-logging-service at all

Grzegorz Grzybek
June 3, 2019, 2:18 PM

Now, after changes related to PAXLOGGING-252, all "API" packages are actually exported from pax-logging-api:

Assignee

Grzegorz Grzybek

Reporter

Alexey Markevich

Fix versions

Labels

None

Components

Affects versions

Priority

Minor
Configure