03-24-2013 11:54 PM
It appears log4j loads the log4j.xml embedded in nuxeo-launcher.jar as opposed to the one in lib/. Is this the intended behavior? It makes lib/log4j.xml essentially useless. A workaround is to use -Dlog4j.configuration to directly reference lib/log4j.xml.
You can easily check this by adding -Dlog4j.debug as property to the launching JVM (in nuxeoctl).
(this is with latest published 5.7-SNAPSHOT).
03-25-2013 03:44 PM
Hello,
Are you sure you have an issue?
/>
Instead of editing nuxeoctl, please add the following to nuxeo.conf: JAVA_OPTS=$JAVA_OPTS -Dlog4j.debug
. Then run ./bin/nuxeoctl console
in order to see the server's Log4J initialization.
I activated log4j.debug on the Launcher (in nuxeoctl script) and on Nuxeo (in nuxeo.conf):
log4j: Trying to find [log4j.xml] using context classloader sun.misc.Launcher$AppClassLoader@24ee5d13.
log4j: Using URL [jar:file:/home/julien/.../nuxeo-cap-5.7-SNAPSHOT-tomcat/tmp/nuxeo-launcher-22833.jar!/log4j.xml] for automatic log4j configuration.
Detected Tomcat server.
(...)
Configuration files generated.
log4j: Trying to find [log4j.xml] using context classloader org.apache.catalina.loader.StandardClassLoader@79e4620e
log4j: Using URL [file:/home/julien/.../nuxeo-cap-5.7-SNAPSHOT-tomcat/lib/log4j.xml] for automatic log4j configuration.
It uses the right log4j configuration for each.
03-25-2013 09:42 AM
It works for me, using a snapshot from Friday I get
03-25-2013 10:24 AM
Weird. I'm using the nuxeo-cap.zip distribution [here][1]. Then I launch nuxeo with either nuxeoctl console or nuxeoctl start. I get
03-25-2013 10:40 AM
The nuxeo-launcher's log4j is used and must not be removed.
03-25-2013 12:00 PM
Yes not sure why I get a different ClassLoader.
03-25-2013 03:44 PM
Hello,
Are you sure you have an issue?
/>
Instead of editing nuxeoctl, please add the following to nuxeo.conf: JAVA_OPTS=$JAVA_OPTS -Dlog4j.debug
. Then run ./bin/nuxeoctl console
in order to see the server's Log4J initialization.
I activated log4j.debug on the Launcher (in nuxeoctl script) and on Nuxeo (in nuxeo.conf):
log4j: Trying to find [log4j.xml] using context classloader sun.misc.Launcher$AppClassLoader@24ee5d13.
log4j: Using URL [jar:file:/home/julien/.../nuxeo-cap-5.7-SNAPSHOT-tomcat/tmp/nuxeo-launcher-22833.jar!/log4j.xml] for automatic log4j configuration.
Detected Tomcat server.
(...)
Configuration files generated.
log4j: Trying to find [log4j.xml] using context classloader org.apache.catalina.loader.StandardClassLoader@79e4620e
log4j: Using URL [file:/home/julien/.../nuxeo-cap-5.7-SNAPSHOT-tomcat/lib/log4j.xml] for automatic log4j configuration.
It uses the right log4j configuration for each.
03-25-2013 05:17 PM
You are right I didn't realize there were 2 JVM involved here.
03-26-2013 08:15 AM
Most people don't need to change Launcher logging and there are [debug options ('-d' and '-dc')][1] which allow to debug the Launcher without having to edit the log4j configuration. Also, I planned to allow dynamic log4j customization from an embedded Nuxeo Shell ('nuxeoctl shell')...
03-26-2013 08:19 AM
Makes sense! '-d' definitively does the trick.
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.