-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: C3PO logger
PostPosted: Wed Dec 21, 2005 2:46 pm 
Newbie

Joined: Wed Dec 21, 2005 2:37 pm
Posts: 5
Hello,

We are currently using Hibernate in a commerical product.
I would like to know how can we disable the log level for c3po, since during the initialization it shows all the configuration including the user name and password to connect the database into the logger

Initializing c3p0 pool... com.mchange.v2.c3p0.PoolBackedDataSource@164b9b6 [ connectionPoolDataSource -> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource@8acfc3 [ acquireIncrement -> 2, autoCommitOnClose -> false, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, idleConnectionTestPeriod -> 3000, initialPoolSize -> 5, maxIdleTime -> 1800, maxPoolSize -> 20, maxStatements -> 50, minPoolSize -> 5, nestedDataSource -> com.mchange.v2.c3p0.DriverManagerDataSource@1dc64a5 [ description -> null, driverClass -> null, factoryClassLocation -> null, jdbcUrl -> jdbc:mysql:///fts, properties -> {user=root, password=root} ] , propertyCycle -> 300, testConnectionOnCheckout -> false ] , factoryClassLocation -> null, numHelperThreads -> 3 ]
2005-12-21 19:25:53,434 WARN (Configurator.java:125) No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: file:/jakarta-tomcat-5.0.30/work/Catalina/localhost/fts/loader/ehcache-failsafe.xml

We use log4j

Thanks in advance


Top
 Profile  
 
 Post subject: log level
PostPosted: Wed Dec 21, 2005 5:39 pm 
Expert
Expert

Joined: Fri Jul 22, 2005 2:42 pm
Posts: 670
Location: Seattle, WA
H 3.1 CVS does not give away password, but shows db user:
log.info( "Connection properties: " + PropertiesHelper.maskOut(connectionProps, "password") );

To prevent printing from C3P0ConnectionProvider add the following line to your log4j.properties file:
log4j.logger.org.hibernate.connection.C3P0ConnectionProvider=fatal

_________________
--------------
Konstantin

SourceLabs - dependable OpenSource systems


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 22, 2005 4:54 am 
Newbie

Joined: Wed Dec 21, 2005 2:37 pm
Posts: 5
kgignatyev,

I'm using c3p0 version 0.8.4.5 and Hibernate 2.18.
Putting the log level for the package you gave me does not work. Probably becasue I'm using another H version.

Albert


Top
 Profile  
 
 Post subject: package
PostPosted: Thu Dec 22, 2005 1:53 pm 
Expert
Expert

Joined: Fri Jul 22, 2005 2:42 pm
Posts: 670
Location: Seattle, WA
For H2 I believe it will be
log4j.logger.net.sf.hibernate.connection.C3P0ConnectionProvider=fatal

_________________
--------------
Konstantin

SourceLabs - dependable OpenSource systems


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 23, 2005 4:31 am 
Newbie

Joined: Wed Dec 21, 2005 2:37 pm
Posts: 5
Sorry, but this also does not work.

Albert


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.