You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Luiz Marcelo Serique <ma...@gmail.com> on 2012/02/03 18:44:36 UTC

How to DEBUG the new tomcat-jdbc pool?

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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: How to DEBUG the new tomcat-jdbc pool?

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Luiz,

On 2/3/12 12:44 PM, Luiz Marcelo Serique wrote:
> 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.

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.

> 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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk8sNWcACgkQ9CaO5/Lv0PAuKgCfTgc15ZjIJelUTnLw4bxELVAN
UOEAnR6Y5uMxSK+n1J2MTlpK0D/7zifE
=PgSK
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org