Discussion:
How to DEBUG the new tomcat-jdbc pool?
Luiz Marcelo Serique
2012-02-03 17:44:36 UTC
Permalink
Hi everyone,

I´m trying to log DEBUG info of the org.apache.tomcat.jdbc package.

My system is configured with log4j, just like
http://tomcat.apache.org/tomcat-7.0-doc/logging.html instructions.

I have included a new appender in log4j.properties:

log4j.appender.POOL=org.apache.log4j.DailyRollingFileAppender
log4j.appender.POOL.File=${catalina.base}/logs/pool.log
log4j.appender.POOL.Append=true
log4j.appender.POOL.Encoding=UTF-8
log4j.appender.POOL.DatePattern='.'yyyy-MM-dd'.log'
log4j.appender.POOL.layout = org.apache.log4j.PatternLayout
log4j.appender.POOL.layout.ConversionPattern = %d [%t] %-5p %c- %m%n

And a new log4j.logger:

log4j.logger.org.apache.tomcat.jdbc=DEBUG, POOL

But anything appear in the pool.log file.

Is there anything wrong with this config?

And is possible to log the org.apache.tomcat.jdbc package/

Additional Info:

Tomcat 7.0.23
Windows 2008 64 bits
log4j 1.2.16

--
L. Marcelo
Christopher Schultz
2012-02-03 19:28:39 UTC
Permalink
Luiz,
Post by Luiz Marcelo Serique
Hi everyone,
I´m trying to log DEBUG info of the org.apache.tomcat.jdbc
package.
My system is configured with log4j, just like
http://tomcat.apache.org/tomcat-7.0-doc/logging.html instructions.
log4j.appender.POOL=org.apache.log4j.DailyRollingFileAppender
log4j.appender.POOL.File=${catalina.base}/logs/pool.log
log4j.appender.POOL.Append=true log4j.appender.POOL.Encoding=UTF-8
log4j.appender.POOL.DatePattern='.'yyyy-MM-dd'.log'
log4j.appender.POOL.layout = org.apache.log4j.PatternLayout
log4j.appender.POOL.layout.ConversionPattern = %d [%t] %-5p %c- %m%n
log4j.logger.org.apache.tomcat.jdbc=DEBUG, POOL
But anything appear in the pool.log file.
What is the "threshold" for the POOL appender? While your logger might
be configured to emit the log message, the appender might still be
filtering it.
Post by Luiz Marcelo Serique
And is possible to log the org.apache.tomcat.jdbc package/
You'll have to check the code to see what log messages might be emitted.

- -chris

Loading...