Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Turning off hibernate console messages

 
Siamak Saarmann
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am running a sample hibernate program which uses log4j too. when run in console it printsout a lot of INFOs. I tried to turn these off from log4j properties file (turning everything to off) but it continues to print pages of info:

Apr 22, 2005 6:30:59 PM net.sf.hibernate.cfg.Environment <clinit>
INFO: Hibernate 2.1.6
Apr 22, 2005 6:30:59 PM net.sf.hibernate.cfg.Environment <clinit>
INFO: loaded properties from resource hibernate.properties: {hibernate.connectio
n.driver_class=org.gjt.mm.mysql.Driver, hibernate.cglib.use_reflection_optimizer
=true, hibernate.cache.provider_class=net.sf.hibernate.cache.EhCacheProvider, hi
bernate.cache.use_query_cache=true, hibernate.max_fetch_depth=1, hibernate.diale
ct=net.sf.hibernate.dialect.MySQLDialect, hibernate.jdbc.use_streams_for_binary=
true, hibernate.jdbc.batch_size=0, hibernate.query.substitutions=true 1, false 0
, yes 'Y', no 'N', hibernate.proxool.pool_alias=pool1, hibernate.connection.user
name=root, hibernate.cache.region_prefix=hibernate.test, hibernate.connection.ur
l=jdbc:mysql:///test, hibernate.show_sql=true, hibernate.connection.password=123
, hibernate.jdbc.batch_versioned_data=true, hibernate.connection.pool_size=1}
Apr 22, 2005 6:30:59 PM net.sf.hibernate.cfg.Environment <clinit>
INFO: using java.io streams to persist binary types
Apr 22, 2005 6:30:59 PM net.sf.hibernate.cfg.Environment <clinit>
INFO: using CGLIB reflection optimizer
Apr 22, 2005 6:30:59 PM net.sf.hibernate.cfg.Configuration configure
INFO: configuring from resource: /hibernate.cfg.xml
Apr 22, 2005 6:30:59 PM net.sf.hibernate.cfg.Configuration getConfigurationInput
Stream
...
2 more pages!


Would someone please tell me how can I turn this off?

Regards,
Mac
 
PJ Crump
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In your log4j config file add (or change) your entry for
log4j.logger.net=WARN
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic