03-29-2012 05:08 PM
Adding the following category in $NUXEO_HOME/lib/log4j.xml does not seem to enable DEBUG logging for "org.apache.catalina" within the Tomcat Nuxeo Distribution. Does this category require special configuration?
04-06-2012 11:58 AM
Hello,
$NUXEO_HOME/conf/logging.properties
has no effect; you can safely remove it.
The point is Tomcat uses java.util.logging whereas Nuxeo uses Log4J.
Nuxeo provides a bridge for redirecting java.util.logging to Apache Commons Logging (compliant with Log4J) with a default threshold set at INFO level. You can customize it by adding into nuxeo.conf
:
JAVA_OPTS=$JAVA_OPTS -Dorg.nuxeo.runtime.redirectJUL.threshold=DEBUG
Edit: the right corresponding JUL value for Log4J DEBUG level is
JAVA_OPTS=$JAVA_OPTS -Dorg.nuxeo.runtime.redirectJUL.threshold=CONFIG
But that redirection is only available after Nuxeo Framework initialization whereas most of the startup logs from org.apache.catalina happen before (when the redirection is not yet active).
So, if you want to see Catalina messages, you must also:
tomcat-juli-adapters.jar
into $NUXEO_HOME/lib/
tomcat-juli.jar
into $NUXEO_HOME/bin/
(replace the existing one)At this point, the Log4J configuration will also apply on logs sent to java.util.logging; the category you added will work.
You may be interested by NXP-7014.
03-29-2012 06:02 PM
Nope, normally this enough... You just have to restart your tomcat, normally. Check that there is no other child category of org.apache.catalina into your log4j.xml.
03-30-2012 11:00 AM
I am using the standard nuxeo 5.5 tomcat-based distribution and I have no other child categories of org.apache.catalina. DEBUG priority works fine for other categories. However, DEBUG priority seems to be ignored for org.apache.catalina.
03-30-2012 01:12 PM
Are you sure enabling org.apache.catalina debug logging via a standard $NUXEO_HOME/lib/log4j.xml modification works with a Nuxeo 5.5 Tomcat Distribution and causes these logging statements to be added to the normal nuxeo server.log? I am suspicious there might be conflicts between the logging.properties in $NUXEO_HOME/conf and the log4j.xml in $NUXEO_HOME/lib.
04-06-2012 11:58 AM
Hello,
$NUXEO_HOME/conf/logging.properties
has no effect; you can safely remove it.
The point is Tomcat uses java.util.logging whereas Nuxeo uses Log4J.
Nuxeo provides a bridge for redirecting java.util.logging to Apache Commons Logging (compliant with Log4J) with a default threshold set at INFO level. You can customize it by adding into nuxeo.conf
:
JAVA_OPTS=$JAVA_OPTS -Dorg.nuxeo.runtime.redirectJUL.threshold=DEBUG
Edit: the right corresponding JUL value for Log4J DEBUG level is
JAVA_OPTS=$JAVA_OPTS -Dorg.nuxeo.runtime.redirectJUL.threshold=CONFIG
But that redirection is only available after Nuxeo Framework initialization whereas most of the startup logs from org.apache.catalina happen before (when the redirection is not yet active).
So, if you want to see Catalina messages, you must also:
tomcat-juli-adapters.jar
into $NUXEO_HOME/lib/
tomcat-juli.jar
into $NUXEO_HOME/bin/
(replace the existing one)At this point, the Log4J configuration will also apply on logs sent to java.util.logging; the category you added will work.
You may be interested by NXP-7014.
04-06-2012 02:24 PM
Much thanks for the post! This is the exact information I was looking for.
02-20-2013 05:43 AM
Hello Julien, i tryed to add leading instruction in my nuxeo.conf, but server does not start, (bad level "DEBUG" error is logged). Also, if i change DEBUG with INFO server is starting up as expected.
02-20-2013 01:58 PM
The sample value was not good
08-06-2013 10:22 AM
Note
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.