-->
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.  [ 6 posts ] 
Author Message
 Post subject: how to neutralize the hibernate log ???
PostPosted: Sun Mar 02, 2008 11:21 am 
Newbie

Joined: Wed Nov 28, 2007 9:36 am
Posts: 8
hi ,
i have tried changing the log4j.properties in the classPath ,
i have tried it by adding to the ..server\default\conf\log4j.xml :
Code:
<category name="org.hibernate">
     <priority value="ERROR"/>
  </category>
 
     <category name="org.hibernate.cache.ReadWriteCache">
        <priority value="ERROR"/>
     </category>
     <category name="org.hibernate.cache.EhCacheProvider">
        <priority value="ERROR"/>
     </category>
     <category name="org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog">
        <priority value="ERROR"/>
     </category>

   <!-- Limit the org.apache category to INFO as its DEBUG is verbose -->
   <category name="org.apache">
      <priority value="ERROR"/>
   </category>

but still i see INFO level messages in the Console :

Code:
17:18:15,767 INFO  [STDOUT] 17:18:15,767 [Thread-31] DEBUG GooGooStatementCache : com.mchange.v2.c3p0.stmt.GlobalMaxOnlyStatementCache ----> CACHE HIT
17:18:15,767 INFO  [STDOUT] 17:18:15,767 [Thread-31] DEBUG GooGooStatementCache : checkoutStatement: com.mchange.v2.c3p0.stmt.GlobalMaxOnlyStatementCache stats -- total size: 26; checked out: 1; num connections: 5; num keys: 26
17:18:15,767 INFO  [STDOUT] 17:18:15,767 [Thread-31] DEBUG GooGooStatementCache : checkinStatement(): com.mchange.v2.c3p0.stmt.GlobalMaxOnlyStatementCache stats -- total size: 26; checked out: 0; num connections: 5; num keys: 26
17:18:15,767 INFO  [STDOUT] 17:18:15,767 [Thread-31] DEBUG GooGooStatementCache : checkinAll(): com.mchange.v2.c3p0.stmt.GlobalMaxOnlyStatementCache stats -- total size: 26; checked out: 0; num connections: 5; num keys: 26
17:18:15,767 INFO  [STDOUT] 17:18:15,767 [Thread-31] DEBUG BasicResourcePool : trace com.mchange.v2.resourcepool.BasicResourcePool@115676d [managed: 5, unused: 4, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@b04d34)
17:18:15,767 INFO  [STDOUT] 17:18:15,767 [Thread-31] DEBUG BasicResourcePool : resource age is okay: com.mchange.v2.c3p0.impl.NewPooledConnection@146c2cb ---> age: 10031   max: 300000 [com.mchange.v2.resourcepool.BasicResourcePool@115676d]
17:18:15,767 INFO  [STDOUT] 17:18:15,767 [Thread-31] DEBUG BasicResourcePool : trace com.mchange.v2.resourcepool.BasicResourcePool@115676d [managed: 5, unused: 4, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@b04d34)
17:18:15,767 INFO  [STDOUT] Hibernate: select this_.KEY_NUM as KEY1_8_0_, this_.VERSION as VERSION8_0_, this_.INSTANCE_KEY_NUM as INSTANCE3_8_0_, this_.PP_KEY_NUM as PP4_8_0_, this_.PTP_TASK_KEY_NUM as PTP5_8_0_, this_.NAME as NAME8_0_, this_.DESCRIPTION as DESCRIPT7_8_0_, this_.OFFSET as OFFSET8_0_, this_.DELAY_TIME as DELAY9_8_0_, this_.MAX_TIME as MAX10_8_0_, this_.STARTED_AT as STARTED11_8_0_, this_.ENDED_AT as ENDED12_8_0_, this_.ASSIGNMENT_GROUP as ASSIGNMENT13_8_0_, this_.ASSIGNED_OWNER as ASSIGNED14_8_0_, this_.AUTO_MANUAL as AUTO15_8_0_, this_.CHARGE_METHOD as CHARGE16_8_0_, this_.TOTAL_CHARGES as TOTAL17_8_0_, this_.STATUS as STATUS8_0_, this_.STAGE_NODE_PROCESS as STAGE19_8_0_, this_.HOST_NAME as HOST20_8_0_, this_.ACTION as ACTION8_0_, this_.TASK_RETURN_VALUE as TASK22_8_0_, this_.TASK_RETURN_DESCRIPTION as TASK23_8_0_, this_.JBPM_PI_ID as JBPM24_8_0_, this_.TASK_RETURN_STATUS as TASK25_8_0_, this_.PARAMS_STR as PARAMS26_8_0_, this_.JBPM_TASK_ID as JBPM27_8_0_, this_.PROCESS_NAME as PROCESS28_8_0_, this_.PROCESS_TYPE as PROCESS29_8_0_, this_.DELAYED_AT as DELAYED30_8_0_, this_.CHARGE as CHARGE8_0_, this_.COMPANY_KEY_NUM as COMPANY32_8_0_, this_.LAST_SUBSYS_NAME as LAST33_8_0_, this_.CREATION_DATE as CREATION34_8_0_, this_.LAST_UPDATE_DATE as LAST35_8_0_, this_.LAST_USER_NAME as LAST36_8_0_ from WorkFlow.dbo.WF_TASKS this_ where this_.COMPANY_KEY_NUM=? and this_.STATUS=?
17:18:15,783 INFO  [STDOUT] 17:18:15,783 [Thread-31] DEBUG GooGooStatementCache : com.mchange.v2.c3p0.stmt.GlobalMaxOnlyStatementCache ----> CACHE HIT
17:18:15,783 INFO  [STDOUT] 17:18:15,783 [Thread-31] DEBUG GooGooStatementCache : checkoutStatement: com.mchange.v2.c3p0.stmt.GlobalMaxOnlyStatementCache stats -- total size: 26; checked out: 1; num connections: 5; num keys: 26
17:18:15,783 INFO  [STDOUT] 17:18:15,783 [Thread-31] DEBUG GooGooStatementCache : checkinStatement(): com.mchange.v2.c3p0.stmt.GlobalMaxOnlyStatementCache stats -- total size: 26; checked out: 0; num connections: 5; num keys: 26
17:18:15,783 INFO  [STDOUT] 17:18:15,783 [Thread-31] DEBUG GooGooStatementCache : checkinAll(): com.mchange.v2.c3p0.stmt.GlobalMaxOnlyStatementCache stats -- total size: 26; checked out: 0; num connections: 5; num keys: 26
17:18:15,783 INFO  [STDOUT] 17:18:15,783 [Thread-31] DEBUG BasicResourcePool : trace com.mchange.v2.resourcepool.BasicResourcePool@115676d [managed: 5, unused: 4, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@b04d34)


how can i remove these messages ?


Top
 Profile  
 
 Post subject: hibernate info logging
PostPosted: Thu May 29, 2008 3:22 pm 
Beginner
Beginner

Joined: Fri May 16, 2008 3:59 pm
Posts: 30
did you ever find how to reduce those 'info' level logs from hibernate?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 09, 2008 10:56 am 
Newbie

Joined: Tue Aug 26, 2003 2:31 pm
Posts: 15
Location: San Diego, CA
I'm having the same issue. If you found the solution, or if anyone else knows it, please, post here if you could.

Thanks!


Top
 Profile  
 
 Post subject: turn off c3p0
PostPosted: Mon Jun 09, 2008 11:29 am 
Beginner
Beginner

Joined: Fri Jun 29, 2007 11:12 am
Posts: 25
Hello,
add the following to your log4j.properties or xml:

Code:
...
log4j.logger.com.mchange=INFO
...


that does the trick.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 09, 2008 12:02 pm 
Newbie

Joined: Tue Aug 26, 2003 2:31 pm
Posts: 15
Location: San Diego, CA
I was able to solve the problem by first using the debug command line switch:

-Dlog4j.debug=true

That showed me that the jar was indeed picking up my log4j properties file. It turns out that the output I was getting wasn't from log4j, but from slf4j (or at least I'm pretty sure thats where it came from)


My output messages looked like this:
Code:
08:20:26.224 [main] DEBUG org.hibernate.util.DTDEntityResolver


I only stated getting these when I upgraded to the latest hibernate file, which included an slf4j file.

I included the api jar, but it turns out that the system also needs the log4j file.

So I included both:
slf4j-api-1.5.2.jar
slf4j-log4j12-1.5.2.jar

With both of those packaged up in my jar, everything worked great.

Hope this helps.

-- Jeff


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 01, 2008 2:28 pm 
Newbie

Joined: Mon Sep 01, 2008 2:13 pm
Posts: 1
Environment: Eclipse + jBoss 4.2.2 + Seam

Open persistence.xml

Change
Code:
<property name="hibernate.show_sql" value="true"/>


Into:
Code:
<property name="hibernate.show_sql" value="false"/>


Now Hibernate will stop showing sql in log files.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 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.