tags:

views:

347

answers:

1

hey all, I'm just getting started with c3p0 for database connection pooling. It's attaching itself to my log4j output currently. How do I set logging off or at least to SEVERE level only for c3p0? I tried tweaking the properties file but not sure it's being picked up properly.

any ideas on how best to turn it off?

thanks

UPDATE: this seems to work in the log4j.properties file

log4j.logger.com.mchange.v2.c3p0.impl=INFO

log4j.logger.com.mchange=INFO
+1  A: 

if you use a log4j.xml file you can simple define a logger for the c3po package:

<logger name="com.mchange.v2.c3p0">
    <level value="SEVERE"/>
</logger>

there are analogous methods for log4j.properties i think it's just:

log4j.logger.com.mchange.v2.c3p0=SEVERE
smeg4brains
I'm currently using a log4j.properties file, any idea how to do it in there?
added a log4j.properties logger example
smeg4brains
thanks! I had to tweak it a little but the log4j.properties file worked :)