logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tommmmmm <tommm...@gmail.com>
Subject Re: Log4J doesn't work at all
Date Wed, 11 Apr 2012 16:45:49 GMT
I used the old project I had in my Projects list. And it works there
flawlessly.

For easier readability here are the results:

Log4j configuration debug output in working project:
**Start of LogManager static initializer
*** configurationOptionStr=null
** End of LogManager static initializer
DEBUG [org.apache.log4j.PropertyConfigurator] Parsing for [root] with
value=[DEBUG, stdout].
DEBUG [org.apache.log4j.PropertyConfigurator] Level token is [DEBUG].
DEBUG [org.apache.log4j.PropertyConfigurator] Category root set to DEBUG.
DEBUG [org.apache.log4j.PropertyConfigurator] Parsing appender named
"stdout".
DEBUG [org.apache.log4j.PropertyConfigurator] Parsing layout options for
"stdout".
DEBUG [org.apache.log4j.config.PropertySetter] Setting property
[conversionPattern] to [%5p [%c] %m%n].
DEBUG [org.apache.log4j.PropertyConfigurator] End of parsing for "stdout".
DEBUG [org.apache.log4j.PropertyConfigurator] Parsed "stdout" options.
DEBUG [org.apache.log4j.PropertyConfigurator] Parsing for
[org.apache.http.wire] with value=[DEBUG].
DEBUG [org.apache.log4j.PropertyConfigurator] Level token is [DEBUG].
DEBUG [org.apache.log4j.PropertyConfigurator] Category org.apache.http.wire
set to DEBUG.
DEBUG [org.apache.log4j.PropertyConfigurator] Handling
log4j.additivity.org.apache.http.wire=[null]
DEBUG [org.apache.log4j.PropertyConfigurator] Parsing for [org.apache.http]
with value=[DEBUG].
DEBUG [org.apache.log4j.PropertyConfigurator] Level token is [DEBUG].
DEBUG [org.apache.log4j.PropertyConfigurator] Category org.apache.http set
to DEBUG.
DEBUG [org.apache.log4j.PropertyConfigurator] Handling
log4j.additivity.org.apache.http=[null]
DEBUG [org.apache.log4j.PropertyConfigurator] Parsing for [stupidClass]
with value=[DEBUG].
DEBUG [org.apache.log4j.PropertyConfigurator] Level token is [DEBUG].
DEBUG [org.apache.log4j.PropertyConfigurator] Category stupidClass set to
DEBUG.
DEBUG [org.apache.log4j.PropertyConfigurator] Handling
log4j.additivity.stupidClass=[null]
DEBUG [org.apache.log4j.PropertyConfigurator] Parsing for [jobManager] with
value=[DEBUG].
DEBUG [org.apache.log4j.PropertyConfigurator] Level token is [DEBUG].
DEBUG [org.apache.log4j.PropertyConfigurator] Category jobManager set to
DEBUG.
DEBUG [org.apache.log4j.PropertyConfigurator] Handling
log4j.additivity.jobManager=[null]
DEBUG [org.apache.log4j.PropertyConfigurator] Finished configuring.

Log4j configuration debug output in NOT working project:
log4j: Trying to find [log4j.xml] using context classloader
sun.misc.Launcher$AppClassLoader@2827f394.
log4j: Trying to find [log4j.xml] using
sun.misc.Launcher$AppClassLoader@2827f394 class loader.
log4j: Trying to find [log4j.xml] using ClassLoader.getSystemResource().
log4j: Trying to find [log4j.properties] using context classloader
sun.misc.Launcher$AppClassLoader@2827f394.
log4j: Using URL
[file:/home/min/ucng/ucng_java/sBorgJava/src/logging/log4j.properties] for
automatic log4j configuration.
log4j: Reading configuration from URL
file:/home/min/ucng/ucng_java/sBorgJava/src/logging/log4j.properties
log4j: Parsing for [root] with value=[DEBUG, stdout].
log4j: Level token is [DEBUG].
log4j: Category root set to DEBUG
log4j: Parsing appender named "stdout".
log4j: Parsing layout options for "stdout".
log4j: Setting property [conversionPattern] to [%5p [%c] %m%n].
log4j: End of parsing for "stdout".
log4j: Parsed "stdout" options.
log4j: Parsing for [org.apache.http.wire] with value=[DEBUG].
log4j: Level token is [DEBUG].
log4j: Category org.apache.http.wire set to DEBUG
log4j: Handling log4j.additivity.org.apache.http.wire=[null]
log4j: Parsing for [org.apache.http] with value=[DEBUG].
log4j: Level token is [DEBUG].
log4j: Category org.apache.http set to DEBUG
log4j: Handling log4j.additivity.org.apache.http=[null]
log4j: Parsing for [stupidClass] with value=[DEBUG].
log4j: Level token is [DEBUG].
log4j: Category stupidClass set to DEBUG
log4j: Handling log4j.additivity.stupidClass=[null]
log4j: Parsing for [jobManager] with value=[DEBUG].
log4j: Level token is [DEBUG].
log4j: Category jobManager set to DEBUG
log4j: Handling log4j.additivity.jobManager=[null]
log4j: Finished configuring.
log4j: Parsing for [root] with value=[DEBUG, stdout].
log4j: Level token is [DEBUG].
log4j: Category root set to DEBUG
log4j: Parsing appender named "stdout".
log4j: Parsing layout options for "stdout".
log4j: Setting property [conversionPattern] to [%5p [%c] %m%n].
log4j: End of parsing for "stdout".
log4j: Parsed "stdout" options.
log4j: Parsing for [org.apache.http.wire] with value=[DEBUG].
log4j: Level token is [DEBUG].
log4j: Category org.apache.http.wire set to DEBUG
log4j: Handling log4j.additivity.org.apache.http.wire=[null]
log4j: Parsing for [org.apache.http] with value=[DEBUG].
log4j: Level token is [DEBUG].
log4j: Category org.apache.http set to DEBUG
log4j: Handling log4j.additivity.org.apache.http=[null]
log4j: Parsing for [stupidClass] with value=[DEBUG].
log4j: Level token is [DEBUG].
log4j: Category stupidClass set to DEBUG
log4j: Handling log4j.additivity.stupidClass=[null]
log4j: Parsing for [jobManager] with value=[DEBUG].
log4j: Level token is [DEBUG].
log4j: Category jobManager set to DEBUG
log4j: Handling log4j.additivity.jobManager=[null]
log4j: Finished configuring.

Classpath in working project:
/home/min/netbeans-7.1.1/java/modules/ext/toplink/toplink-essentials.jar
/home/min/netbeans-7.1.1/java/modules/ext/toplink/toplink-essentials-agent.jar
/home/min/netbeans-7.0.1/ide/modules/ext/mysql-connector-java-5.1.13-bin.jar
/home/min/netbeans-7.1.1/java/modules/ext/beansbinding-1.2.1.jar
/home/min/ucng/javaLibs/eclipselink-2.3.2/jlib/eclipselink.jar
/home/min/netbeans-7.1.1/java/modules/ext/eclipselink/javax.persistence-2.0.jar
/home/min/netbeans-7.1.1/java/modules/ext/eclipselink/org.eclipse.persistence.jpa.jpql_1.0.0.jar
/home/min/ucng/javaLibs/htmlunit-2.9/lib/commons-codec-1.4.jar
/home/min/ucng/javaLibs/htmlunit-2.9/lib/commons-collections-3.2.1.jar
/home/min/ucng/javaLibs/htmlunit-2.9/lib/commons-io-2.0.1.jar
/home/min/ucng/javaLibs/htmlunit-2.9/lib/commons-lang-2.6.jar
/home/min/ucng/javaLibs/htmlunit-2.9/lib/commons-logging-1.1.1.jar
/home/min/ucng/javaLibs/htmlunit-2.9/lib/cssparser-0.9.5.jar
/home/min/ucng/javaLibs/htmlunit-2.9/lib/htmlunit-2.9.jar
/home/min/ucng/javaLibs/htmlunit-2.9/lib/htmlunit-core-js-2.9.jar
/home/min/ucng/javaLibs/htmlunit-2.9/lib/httpclient-4.1.2.jar
/home/min/ucng/javaLibs/htmlunit-2.9/lib/httpcore-4.1.2.jar
/home/min/ucng/javaLibs/htmlunit-2.9/lib/httpmime-4.1.2.jar
/home/min/ucng/javaLibs/htmlunit-2.9/lib/nekohtml-1.9.15.jar
/home/min/ucng/javaLibs/htmlunit-2.9/lib/sac-1.3.jar
/home/min/ucng/javaLibs/htmlunit-2.9/lib/serializer-2.7.1.jar
/home/min/ucng/javaLibs/htmlunit-2.9/lib/xalan-2.7.1.jar
/home/min/ucng/javaLibs/htmlunit-2.9/lib/xercesImpl-2.9.1.jar
/home/min/ucng/javaLibs/htmlunit-2.9/lib/xml-apis-1.3.04.jar
/home/min/netbeans-7.1.1/platform/modules/ext/junit-4.10.jar
/home/min/netbeans-7.1.1/enterprise/modules/ext/javaee-api-6.0.jar
/home/min/netbeans-7.1.1/enterprise/modules/ext/javaee-web-api-6.0.jar
/home/min/netbeans-7.1.1/enterprise/modules/ext/javaee6-endorsed/javax.annotation.jar
/home/min/netbeans-7.1.1/enterprise/modules/ext/javaee6-endorsed/jaxb-api-osgi.jar
/home/min/netbeans-7.1.1/enterprise/modules/ext/javaee6-endorsed/webservices-api-osgi.jar
/home/min/netbeans-7.1.1/java/modules/ext/AbsoluteLayout.jar
/home/min/workspace/JDownloader/build/newBuild/update/dist/JDownloader.jar
/home/min/ucng/javaLibs/json-lib-2.4-jdk15-javadoc.jar
/home/min/ucng/javaLibs/json-lib-2.4-jdk15.jar
/home/min/ucng/javaLibs/ezmorph-1.0.6.jar
/home/min/ucng/javaLibs/commons-logging-1.1.1/commons-logging-1.1.1.jar
/home/min/ucng/javaLibs/commons-logging-1.1.1/commons-logging-adapters-1.1.1.jar
/home/min/ucng/javaLibs/commons-logging-1.1.1/commons-logging-api-1.1.1.jar
/home/min/ucng/javaLibs/commons-beanutils-1.8.3/commons-beanutils-1.8.3.jar
/home/min/ucng/javaLibs/commons-beanutils-1.8.3/commons-beanutils-bean-collections-1.8.3.jar
/home/min/ucng/javaLibs/commons-beanutils-1.8.3/commons-beanutils-core-1.8.3.jar
/home/min/ucng/javaLibs/commons-collections-3.2.1/commons-collections-3.2.1.jar
/home/min/ucng/javaLibs/xom-1.2.7.jar
/home/min/ucng/javaLibs/chainsaw-bundle/jakarta-oro-2.0.6.jar
/home/min/ucng/javaLibs/chainsaw-bundle/jmdns.jar
/home/min/ucng/javaLibs/chainsaw-bundle/log4j-1.3alpha-7.jar
/home/min/ucng/javaLibs/chainsaw-bundle/log4j-chainsaw-2.0alpha-1.jar
/home/min/ucng/javaLibs/chainsaw-bundle/log4j-optional-1.3alpha-7.jar
/home/min/ucng/javaLibs/chainsaw-bundle/log4j-oro-1.3alpha-7.jar
/home/min/ucng/javaLibs/chainsaw-bundle/log4j-smtp-1.3alpha-7.jar
/home/min/ucng/javaLibs/chainsaw-bundle/log4j-xml-1.3alpha-7.jar
/home/min/ucng/javaLibs/chainsaw-bundle/log4j-zeroconf.jar
/home/min/ucng/javaLibs/chainsaw-bundle/xstream-1.1.2.jar
/home/min/ucng/javaLibs/groovy-1.8.6/embeddable/groovy-all-1.8.6.jar
/home/min/ucng/ucng_java/UCNG/build/classes/

Classpath in NOT working project:
/home/min/ucng/ucng_java/sBorgJava/src/logging/
/home/min/ucng/javaLibs/httpcomponents-client-4.1.3/lib/commons-codec-1.4.jar
/home/min/ucng/javaLibs/httpcomponents-client-4.1.3/lib/commons-logging-1.1.1.jar
/home/min/ucng/javaLibs/httpcomponents-client-4.1.3/lib/httpclient-4.1.3.jar
/home/min/ucng/javaLibs/httpcomponents-client-4.1.3/lib/httpclient-cache-4.1.3.jar
/home/min/ucng/javaLibs/httpcomponents-client-4.1.3/lib/httpcore-4.1.4.jar
/home/min/ucng/javaLibs/httpcomponents-client-4.1.3/lib/httpmime-4.1.3.jar
/home/min/ucng/javaLibs/httpcomponents-client-4.1.3/lib/log4j-1.2.16.jar
/home/min/ucng/javaLibs/commons-codec-1.6/commons-codec-1.6-javadoc.jar
/home/min/ucng/javaLibs/commons-codec-1.6/commons-codec-1.6-tests.jar
/home/min/ucng/javaLibs/commons-codec-1.6/commons-codec-1.6.jar
/home/min/ucng/javaLibs/selenium-server-standalone-2.20.0.jar
/home/min/ucng/javaLibs/scribe-1.3.0.jar
/home/min/ucng/javaLibs/pbapi-full-1.4.0.91/dist/pbapi-j2se.jar
/home/min/ucng/javaLibs/pbapi-full-1.4.0.91/dist/lib/default/apache-mime4j-0.6.jar
/home/min/ucng/javaLibs/pbapi-full-1.4.0.91/dist/lib/default/commons-codec-1.3.jar
/home/min/ucng/javaLibs/pbapi-full-1.4.0.91/dist/lib/default/commons-codec-1.4.jar
/home/min/ucng/javaLibs/pbapi-full-1.4.0.91/dist/lib/default/commons-lang-2.4.jar
/home/min/ucng/javaLibs/pbapi-full-1.4.0.91/dist/lib/default/commons-logging-1.1.1.jar
/home/min/ucng/javaLibs/pbapi-full-1.4.0.91/dist/lib/default/commons-validator-1.3.1.jar
/home/min/ucng/javaLibs/pbapi-full-1.4.0.91/dist/lib/default/httpclient-4.0.jar
/home/min/ucng/javaLibs/pbapi-full-1.4.0.91/dist/lib/default/httpclient-4.1.3.jar
/home/min/ucng/javaLibs/pbapi-full-1.4.0.91/dist/lib/default/httpclient-cache-4.1.3.jar
/home/min/ucng/javaLibs/pbapi-full-1.4.0.91/dist/lib/default/httpcore-4.0.1.jar
/home/min/ucng/javaLibs/pbapi-full-1.4.0.91/dist/lib/default/httpcore-4.1.4.jar
/home/min/ucng/javaLibs/pbapi-full-1.4.0.91/dist/lib/default/httpmime-4.0.jar
/home/min/ucng/javaLibs/pbapi-full-1.4.0.91/dist/lib/default/httpmime-4.1.3.jar
/home/min/ucng/javaLibs/pbapi-full-1.4.0.91/dist/lib/default/jcip-annotations-1.0.jar
/home/min/ucng/javaLibs/pbapi-full-1.4.0.91/dist/lib/default/json-1.0.jar
/home/min/ucng/javaLibs/pbapi-full-1.4.0.91/dist/lib/default/junit-4.9b2.jar
/home/min/ucng/javaLibs/pbapi-full-1.4.0.91/dist/lib/default/log4j-1.2.16.jar
/home/min/ucng/javaLibs/pbapi-full-1.4.0.91/dist/lib/default/signpost-commonshttp4-1.2.1.1.jar
/home/min/ucng/javaLibs/pbapi-full-1.4.0.91/dist/lib/default/signpost-commonshttp4-1.2.1.2.jar
/home/min/ucng/javaLibs/pbapi-full-1.4.0.91/dist/lib/default/signpost-core-1.2.1.1.jar
/home/min/ucng/javaLibs/pbapi-full-1.4.0.91/dist/lib/default/signpost-core-1.2.1.2.jar
/home/min/ucng/javaLibs/pbapi-full-1.4.0.91/dist/lib/default/signpost-jetty6-1.2.1.2.jar
/home/min/ucng/javaLibs/pbapi-full-1.4.0.91/dist/lib/default/slf4j-api-1.6.1.jar
/home/min/ucng/javaLibs/pbapi-full-1.4.0.91/dist/lib/default/slf4j-log4j12-1.6.1.jar
/home/min/ucng/ucng_java/sBorgJava/build/classes/

Lines of code used in working project:
System.setProperty("log4j.debug", "true");
PropertyConfigurator.configure("./../sBorgJava/src/logging/log4j.properties");
// <- notice the ./../ (points to same file)

Lines of code used in NOT working project:
50+. Various. For the sake of it, I commented out everything except
System.setProperty("log4j.debug", "true");
PropertyConfigurator.configure("./sBorgJava/src/logging/log4j.properties");
// <- notice the ./../ (points to same file)
still got the NOT working results.

I already tried adding random jars from working project to not working, but
it didn't help.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message