Re: Log4J + Torque ... gonna drive me mad.

Shinkan <[email protected]>
Newsgroups gmane.comp.jakarta.turbine.torque.user
Message-ID <[email protected]>
>  (for i in `find . -name '*.jar'`; do echo $i; unzip -t $i | grep
> .properties; done) > ../properties.txt
>
>
More fun, on compliant Unix systems : find . -name '*.jar' -exec unzip -t {}
| grep .properties \;

Anyway ...
I did as David Beukes said.
I put a commons-logging.properties file on my classpath, and deported log4j
conf on log4j.properties.
I know have log working ... but not really.
I get DEBUG entries on the log, then suddenly, the same error as before on
System.err, but with different class target :

"log4j:WARN No appenders could be found for logger
(org.apache.commons.configuration.ConfigurationUtils).
log4j:WARN Please initialize the log4j system properly."

I don't even understand why it is talking about "org.apache.commons" AS I
SPECIFICALLY TOLD that I wanted to log org.apache.torque only ... do you
think this is about another log4j file somewhere in my classpath ? (I run
tests on Windows now, so I can't script a find :p).

Here is the commons-logging.properties:
org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.LogFactoryImpl
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger

Here is the log4j.properties:
log4j.category.org.apache.torque = ALL, org.apache.torque
log4j.appender.org.apache.torque = org.apache.log4j.RollingFileAppender
log4j.appender.org.apache.torque.file = log/data.log
log4j.appender.org.apache.torque.layout = org.apache.log4j.PatternLayout
log4j.appender.org.apache.torque.layout.conversionPattern = %d [%t] %-5p %c
- %m%n
log4j.appender.org.apache.torque.maxBackupIndex = 5
log4j.appender.org.apache.torque.maxFileSize = 1MB
log4j.appender.org.apache.torque.append = true

By the way, these 2 files are in my project root /conf directory, which is
explicitely added on classpath.

Thanks in advance ... once again.

-- 
Pierre.
Some people, when confronted with a problem, think "I know, I'll use XML".
Now they have two problems. -- Jamie Zawinski / James Robertson
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.