permaculture playing cards*
The moose likes Object Relational Mapping and the fly likes How to hide/disable Hibernate log to console Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "How to hide/disable Hibernate log to console" Watch "How to hide/disable Hibernate log to console" New topic
Author

How to hide/disable Hibernate log to console

Chengwei Lee
Ranch Hand

Joined: Apr 02, 2004
Posts: 884
I'm using WebSphere Application Server v6.1 and Hibernate. Whenever my server starts up, I get the following. I'm using Log4J too. How could I hide or disable these messages?

Thanks!


[9/19/08 16:57:58:812 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings JDBC driver: Oracle JDBC driver, version: 10.2.0.3.0
[9/19/08 16:57:58:875 SGT] 00000016 Dialect I org.hibernate.dialect.Dialect <init> Using dialect: org.hibernate.dialect.Oracle10gDialect
[9/19/08 16:57:58:906 SGT] 00000016 TransactionFa I org.hibernate.transaction.TransactionFactoryFactory buildTransactionFactory Using default transaction strategy (direct JDBC transactions)
[9/19/08 16:57:58:922 SGT] 00000016 TransactionMa I org.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
[9/19/08 16:57:58:922 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Automatic flush during beforeCompletion(): disabled
[9/19/08 16:57:58:937 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Automatic session close at end of transaction: disabled
[9/19/08 16:57:58:968 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings JDBC batch size: 15
[9/19/08 16:57:58:968 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings JDBC batch updates for versioned data: disabled
[9/19/08 16:57:58:968 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Scrollable result sets: enabled
[9/19/08 16:57:58:984 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings JDBC3 getGeneratedKeys(): disabled
[9/19/08 16:57:59:000 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Connection release mode: auto
[9/19/08 16:57:59:015 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Default batch fetch size: 1
[9/19/08 16:57:59:015 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Generate SQL with comments: disabled
[9/19/08 16:57:59:015 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Order SQL updates by primary key: disabled
[9/19/08 16:57:59:047 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Order SQL inserts for batching: disabled
[9/19/08 16:57:59:047 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory createQueryTranslatorFactory Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
[9/19/08 16:57:59:062 SGT] 00000016 ASTQueryTrans I org.hibernate.hql.ast.ASTQueryTranslatorFactory <init> Using ASTQueryTranslatorFactory
[9/19/08 16:57:59:062 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Query language substitutions: {}
[9/19/08 16:57:59:093 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings JPA-QL strict compliance: disabled
[9/19/08 16:57:59:093 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Second-level cache: enabled
[9/19/08 16:57:59:109 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Query cache: disabled
[9/19/08 16:57:59:109 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory createCacheProvider Cache provider: org.hibernate.cache.NoCacheProvider
[9/19/08 16:57:59:140 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Optimize cache for minimal puts: disabled
[9/19/08 16:57:59:140 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Structured second-level cache entries: disabled
[9/19/08 16:57:59:156 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Statistics: disabled
[9/19/08 16:57:59:203 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Deleted entity synthetic identifier rollback: disabled
[9/19/08 16:57:59:203 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Default entity-mode: pojo
[9/19/08 16:57:59:203 SGT] 00000016 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Named query checking : enabled
[9/19/08 16:57:59:343 SGT] 00000016 SessionFactor I org.hibernate.impl.SessionFactoryImpl <init> building session factory
[9/19/08 16:58:00:656 SGT] 00000016 SessionFactor I org.hibernate.impl.SessionFactoryObjectFactory addInstance Not binding factory to JNDI, no JNDI name configured


SCJP 1.4 * SCWCD 1.4 * SCBCD 1.3 * SCJA 1.0 * TOGAF 8
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Set your console appenders to use a FATAL threshold.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
arulk pillai
Author
Ranch Hand

Joined: May 31, 2007
Posts: 3219
In yoyr Log4J configuration file have something like this




Java Interview Questions and Answers Blog | Amazon.com profile | Java Interview Books
Chengwei Lee
Ranch Hand

Joined: Apr 02, 2004
Posts: 884
I'm using the XML instead of properties file. How do I do this?
Chengwei Lee
Ranch Hand

Joined: Apr 02, 2004
Posts: 884
This is what I'm doing. The Hibernate logs are still appearing in the console. Is there something wrong?

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to hide/disable Hibernate log to console
 
Similar Threads
Session Factory in Logs
Transaction is not being committed
Hibernate Session Factories from org.springframework.orm.hibernate3.LocalSessionFactoryBean
Problem while staring application.. A WebGroup/Virtual Host to handle /s1gcb/logon/sbusePlz help me
How to query?