Hi,
I am trying to use pax-logging-log4j2. Unfortunately, I could not find any docs. Bbut, from the sources, I found that org.ops4j.pax.logging.log4j2.config.file appears to define the location of the log4j2.xml configuration file.
I configured org.ops4j.pax.logging.log4j2.config.file within org.ops4j.pax.logging.properties and it appears to be consumed when starting the DEBUG org.ops4j.pax.logging.pax-logging-log4j2 service (at least, if a wrong file name is given, an error message ist thrown.
But it seams, that whatever pattern layout or debug level I define in log4j2.xml, none will be used by pax-logging-log4j2. In the runtime environment, I started all four pax-logging services including pax-log4j..
A warning is thrown:
WARN
org.eclipse.equinox.cm - Configuration for service.pid=org.ops4j.pax.logging could not be bound to initial@reference:file:../../home/lusu/.eclipse.mars/.metadata/.plugins/org.eclipse.pde.core/.bundle_pool/plugins/org.ops4j.pax.logging.pax-logging-log4j2_1.8.3.jar
but a similar warning is thrown when starting log4j(1) services.
My question is, how do I enable the configuration of pax-logging-log4j2.
This is the log4j-config line in org.ops4j.pax.logging.properties:
org.ops4j.pax.logging.log4j2.config.file=/home/lusu/.eclipse.mars/paxlogger/log4j2.xml
This is my log4j2.xml:
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="DEBUG">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
</Console>
</Appenders>
<Loggers>
<Root level="debug">
<AppenderRef ref="Console" />
</Root>
</Loggers>
</Configuration>
Any hints ?
Lutz