db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vitzethum, Daniel" <Daniel.Vitzet...@gigatronik.com>
Subject AW: Don't get Torque's loggin to work
Date Tue, 16 Nov 2004 13:27:16 GMT
Hi Thomas,

here are my results - I took the time anyway ;-)

It seems to me that the main problem was a version
difference between Torque 3.1's log4j configuration
and the version I use, which is log4j 1.2.8.

(From http://logging.apache.org/log4j/docs/manual.html:
"However, since log4j version 1.2, Logger class has replaced the
Category class.")

One questions still remains: I can only see SELECTs in log output, 
no e.g. INSERTs. There seems to be no output, neither in Torque's
BasePeer nor in the approp. village classes. Any idea? (Is there,
for example, a possibility to grab every statement that passes my
JDBC connection?)

I followed these steps to get log4j to work:

1) added log4j-1.2.8.jar to my runtime classpath.

2) added
   to my servlet's init()-method

3) changed Torque.properties to the following:

# Set root logger level to [DEBUG|INFO|WARN|ERROR|FATAL] and its
log4j.rootLogger=WARN, TORQUE
# or: log4j.rootLogger=DEBUG, TORQUE
# or: log4j.rootLogger=DEBUG, TORQUE, FILE
# etc...

# TORQUE logger to STDOUT
# log BasePeer at DEBUG level
log4j.logger.org.apache.torque.util.BasePeer = DEBUG

# a FILE logger
#log4j.appender.FILE.file = torque.log
#log4j.appender.FILE.append = true

Puh, spent another too-much-time on configuration... :-|



To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org

View raw message