-->
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.  [ 2 posts ] 
Author Message
 Post subject: Remove hibernate logging
PostPosted: Mon Jul 19, 2004 8:44 am 
Newbie

Joined: Thu Jan 29, 2004 11:03 am
Posts: 2
Hi,
I've noticed my problem has been already discussed but I cannot understand how to resolve it.

I'd like to avoid all the INFO hibernate logging.
I tried to change the hibernate.properties.
I've put there:
###########
### LOG ###
###########

### direct log messages to stdout ###
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n

### direct messages to file hibernate.log ###
#log4j.appender.file=org.apache.log4j.FileAppender
#log4j.appender.file.File=hibernate.log
#log4j.appender.file.layout=org.apache.log4j.PatternLayout
#log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n

### set log levels - for more verbose logging change 'info' to 'debug' ###

log4j.rootLogger=ERROR, stdout

log4j.logger.net.sf.hibernate=ERROR

### log just the SQL
#log4j.logger.net.sf.hibernate.SQL=ERROR

### log JDBC bind parameters ###
log4j.logger.net.sf.hibernate.type=ERROR

### log schema export/update ###
log4j.logger.net.sf.hibernate.tool.hbm2ddl=ERROR

### log cache activity ###
log4j.logger.net.sf.hibernate.cache=ERROR

### enable the following line if you want to track down connection ###
### leakages when using DriverManagerConnectionProvider ###
#log4j.logger.net.sf.hibernate.connection.DriverManagerConnectionProvider=trace

but nothing has changed.

I'd like to remove:
Jul 19, 2004 2:37:18 PM net.sf.hibernate.cfg.Environment <clinit>
INFO: Hibernate 2.1 final
Jul 19, 2004 2:37:18 PM net.sf.hibernate.cfg.Environment <clinit>
INFO: loaded properties from resource hibernate.properties:
etc etc
and leave only errors.

Is there someone who could help me?

Thank you very much.

Bye,
Roberto


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 19, 2004 8:48 am 
Expert
Expert

Joined: Fri Feb 06, 2004 7:49 am
Posts: 255
Location: Moscow, Russia
If you use hibernate in EJB container environment, you should tune that container's logging. For example for JBoss default configuration you should edit the following file: 'jboss-3.2.2/server/default/conf/log4j.xml'.

--
Leonid


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