Exception on startup of pax-logging-logback implementation

Description

I added/activated pax-logging-logback implementation in ServiceMix via change in startup.properties and providing the bundles in the system repository.

Received identical error message on ServiceMix startup (see below). I tried both with version 1.7.2 (pre-installed with log4j implementation) and released 1.7.3 which added karaf support (PAXLOGGING-178)

Changes in startup.properties:

karaf shell output:

Environment

ServiceMix 5.0.0

Activity

Show:
Michael Taeschner
September 5, 2014, 12:50 PM

Hi ,

thanks for pointing out the logback.xml config issues, I added the PaxAppenderDelegate appender and fixed the applicationId parameter using MDC discriminator configuration of the SiftingAppender.

This resolves my issue, I have no exception any longer, the log can be accessed via console, only minor inconvenience is following:

Additionally I like your last comments regarding using file for logback config and the improved exception handling.

One more question: To refresh the logback.xml config would I have to restart the pax-logging-logback bundle or is there another approach ?

Michael Taeschner
September 5, 2014, 12:52 PM

Caused by incorrect logback.xml configuration.

See additional points raised by .

StuartS
September 5, 2014, 12:57 PM

As a workaround touching the etc/org.ops4j.pax.logging.cfg file should trigger a configuration update which would reload the logback.xml

StuartS
September 5, 2014, 1:03 PM

PS. log:get assumes that you're using Log4J because it parses the etc/org.ops4j.pax.logging.cfg for the current log levels rather than query the actual backend so it doesn't currently work with pax-logging-logback. However, log:set does work because pax-logging-logback detects that the configuration sent over from Karaf is an attempt to configure log levels and applies them to the current context.

StuartS
September 12, 2014, 10:01 PM

Re-opening to make the two improvements mentioned in this comment:

  • removed misleading exception trace from configureLogbackDefaults

  • changed logback driven configuration to use supplied file reference

With these changes you can now use the scan="true" setting in logback.xml

Assignee

StuartS

Reporter

Michael Taeschner

Fix versions

Labels

Components

Affects versions

Priority

Major
Configure