In addition to the -Dorg.apache.commons.logging.LogFactory=...
that reverts to the default commons-logging config, you should add
the
-D|org.apache.commons.logging.Log=|*org.apache.commons.logging.impl.Jdk14Logger

Or configure properly commons-logging using a configuration file.
You should refer to the commons-logging documentation for more informations.

Note that if you remove the log4j jar from your classpath, it should defaults to the jdk 1.4 logging api.

Cheers,
Guillaume Nodet

*Peter Smith wrote:

In ServiceMix 2.0.2 the log returned is org.apache.geronimo.kernel.log.GeronimoLog

I found JIRA issue SM-190 and tried the workaround:

<quote>
modify the launch script to add the following environment property to the SERVICEMIX_OPTS variable -Dorg.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.LogFactoryImpl
</quote>

And now the log is org.apache.commons.logging.impl.Log4JLogger

---

Unfortunately this is also is no good because I am using JDK1.4 logging mechanism :-(

I have my config file defined as
-Djava.util.logging.config.file=%SERVICEMIX_HOME%\conf\jdk14logging.properties

which used to get detected properly by ServiceMix 1.0

-----

I found there was a log4j.properties getting loaded from <blah>/lib/jencks-all-1.1.1.jar!/log4j.properties so I tried the other workaround instead - I replaced the jencks jar with jencks-all-1.1.2.jar as per SM-190.

But STILL it is using a Log4J logger.....

----

During startup I see the following

Loading ServiceMix (compatible 1.x) from file: servicemix-kunio.xml
log4j:WARN No appenders could be found for logger (org.xbean.spring.context.impl.XBeanXmlBeanDefinitionReader).
log4j:WARN Please initialize the log4j system properly.
....

Why & how do I stop ServiceMix 2.0.2 forcing a Log4J logger upon me so it can detect my JDK14 logging configuration instead.

Thanks
Peter.




Reply via email to