-->
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: Logging problem
PostPosted: Fri Apr 23, 2004 4:23 am 
Newbie

Joined: Thu Apr 22, 2004 4:19 am
Posts: 6
Hi, I'm using log4j with hibernate. The log4j.properties is in my classpath, and contains:

log4j.rootLogger = DEBUG, R

log4j.appender.R = org.apache.log4j.RollingFileAppender
log4j.appender.R.File = C:/Archivos de programa/Apache Group/Tomcat 4.1/logs/gesticon.htm
log4j.appender.R.MaxFileSize = 300KB
log4j.appender.R.MaxBackupIndex = 2

#log4j.appender.R.layout = org.apache.log4j.SimpleLayout
log4j.appender.R.layout = org.apache.log4j.HTMLLayout


log4j.logger.net.sf.hibernate=info

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

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

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

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

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


I'm using this to debug my application, and everything works fine. Logging info is written in my html file. But Hibernate writes logging info to console! Even if I turn off logging, hibernate still writes to the stdout.

What's happening?
Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 23, 2004 5:08 am 
Newbie

Joined: Thu Apr 22, 2004 4:19 am
Posts: 6
Ok, I've resolved the problem. The cause was the version of commons-logging.jar

I was using the one which comes in Tomcat 4.1.29 in common/lib foder, that seems to be older than the one included in Hibernate (doesn't contain Log4jCategoryLog.class). So I put the the jar included in hibernate in my WEB-INF/lib folder, and now everything works fine.


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.