-->
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.  [ 3 posts ] 
Author Message
 Post subject: rookie hibernate/log4j question
PostPosted: Wed Jun 21, 2006 10:59 am 
Beginner
Beginner

Joined: Wed Apr 05, 2006 8:16 pm
Posts: 20
Hi,

I am using log4j in my Websphere WAR to successfully log all my project's events, so I know I have log4j configured correctly and working for my normal logging through Websphere, but I can't seem to get Hibernate to also append to my log. Is there something else I would have to do? Here are my log4j.properties:

log4j.rootLogger=DEBUG, CITACTLog
log4j.logger.org.hibernate.type=DEBUG
log4j.logger.org.apache=ERROR, CITACTLog
#log4j.logger.com.fifththird.cit=DEBUG, CITACTLog

#-------------------------------------
# CITACTLog general log file.
#-------------------------------------
log4j.appender.CITACTLog=org.apache.log4j.RollingFileAppender
log4j.appender.CITACTLog.File=/logtest/CIT_ACT.log
log4j.appender.CITACTLog.MaxFileSize=10MB
log4j.appender.CITACTLog.MaxBackupIndex=5
log4j.appender.CITACTLog.layout=org.apache.log4j.PatternLayout
log4j.appender.CITACTLog.layout.ConversionPattern=%d{ISO8601} %-5p %c [%t]: %m%n%n

I am not getting any kind of logging output from Hibernate in my logs with my current settings. I am using Hibernate 3. Is there something else I need to do to hook into Hibernate's logging? Thanks to anyone for helping me with this question, or for just taking the time to read it! :],

Jim


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 21, 2006 1:49 pm 
Senior
Senior

Joined: Sun Jun 04, 2006 1:58 am
Posts: 136
Hibernate uses commons logging and uses log4j if found on classpath .
Make sure commons logging can find it.

_________________
Don't forget to rate


Top
 Profile  
 
 Post subject: Thanks!
PostPosted: Wed Jun 21, 2006 2:04 pm 
Beginner
Beginner

Joined: Wed Apr 05, 2006 8:16 pm
Posts: 20
This sounds like it's going to be the answer, because running out of Eclipse I had to tie in commons-logging to get "local" logging, which ended up working. Thanks!,

Jim


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