db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alvaro Coronel <alvarocorone...@yahoo.com>
Subject Re: Log4J + Torque ... gonna drive me mad.
Date Thu, 31 Jul 2008 14:41:23 GMT
Yep. I think there's another log4j.properties somewhere. Coming to think about it, maybe there
are several, with all those pesky, verbose libraries we get advantage of.

You running Unix? Try the suggested commands.
The Windows equivalent would be to expand all the .jar files (easily done using multiple-selection
and WinRAR), then run a Search on the resulting folder tree.

Go ahead Shinkan, by now I really want to know if there's another log4j.properties file somewhere
in those jars.

Best of luck,

--- On Thu, 7/31/08, Shinkan <shinkan@gmail.com> wrote:
From: Shinkan <shinkan@gmail.com>
Subject: Re: Log4J + Torque ... gonna drive me mad.
To: "Apache Torque Users List" <torque-user@db.apache.org>
Date: Thursday, July 31, 2008, 4:59 AM

>  (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
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:

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.

Some people, when confronted with a problem, think "I know, I'll use
Now they have two problems. -- Jamie Zawinski / James Robertson

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