Since we're already talking about log4j in another thread -- how about
something more basic?
In particular, I have a web application (.war file) which deploys and
runs properly. When the application runs, the web server's log gets
lots of lines like:
2004-09-23 15:34:30,259 INFO [QueryLogger] SELECT t0.ABBREV, t0 ...
2004-09-23 15:34:30,269 INFO [QueryLogger] === returned 1 row. - took 10 ms.
2004-09-23 15:34:30,274 INFO [QueryLogger] +++ transaction committed.
2004-09-23 15:34:30,309 INFO [QueryLogger] --- will run 1 query.
2004-09-23 15:34:30,318 INFO [QueryLogger] --- transaction started.
etc.
I assume this is normal, but what I'm trying to do is turn it off --
at least for the moment. I know WHAT I need to do -- that is, set the
QueryLogger level to something higher, like WARN. However, I don't
know HOW to do that.
I have in the .war file
WEB-INF/classes/log4j.properties
# Modify default log levels for individual packages.
log4j.logger.org.objectstyle.cayenne = WARN
log4j.logger.org.apache.tapestry = WARN
# This is the logger that controls Cayenne's SQL output.
# Setting the level to INFO or DEBUG will turn the logs on.
log4j.logger.org.objectstyle.cayenne.access.QueryLogger = WARN
which initially looked promising, but has no discernable effect on the
logging output.
Based on the recent thread, I created
WEB-INF/classes/cayenne/cayenne-log.properties:
log4j.rootLogger=DEBUG, A1
log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%-5p %c{1}: %m%n
# General Cayenne logging
log4j.logger.org.objectstyle.cayenne = WARN
log4j.logger.org.objectstyle.cayenne.access.QueryLogger = WARN
# reduce joCache logging
log4j.logger.org.shiftone.cache = INFO
Which also has no discernable effect on the output.
So . . . there's got to be some way to control this stuff, right?
This archive was generated by hypermail 2.0.0 : Thu Sep 23 2004 - 19:03:14 EDT