-->
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: Hibernate LOG4j Appender
PostPosted: Fri Nov 03, 2006 6:23 am 
Newbie

Joined: Wed May 24, 2006 9:30 am
Posts: 7
Please help me with this issue.

In My company a lot of applications deployed on Tomcat share the same log4j.jar and log4j.xml.

In same log4j.xml, every application define its appender and uses it.

I am using hibernate but I am not able to understand what appender name I should specify which hibernate uses internally. When ever I start Tomcat I get following Exception

log4j:WARN No appenders could be found for logger (org.apache.commons.beanutils.ConvertUtils).
log4j:WARN Please initialize the log4j system properly.


My example log4j.xml is

Code:
<appender name="APP1_APPENDER" class="org.apache.log4j.DailyRollingFileAppender">
<param name="File" value="D:/logs/app1_error.log"/>
<param name="DatePattern" value="'.'yyyy-MM-dd"/>
<param name="Append" value="true"/>
<layout class="com.gxs.common.logging.CustomPatternLayout">
<param name="Componentname" value="App1"/>
<param name="Hostname" value="http://10.0.0.4"/>
</layout>
<filter class= "org.apache.log4j.varia.LevelRangeFilter">
<param name= "LevelMin" value= "ALL"/>
</filter>
</appender>
Code:
<logger name="APP1_LOG">
<level value="debug"/>
<appender-ref ref="APP1_APPENDER"/>
</logger>


Every application refer to its logger. Please let me know how can specify for a hibernate system.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 03, 2006 6:32 am 
Regular
Regular

Joined: Tue May 16, 2006 3:32 am
Posts: 117
Check this link:

http://www.hibernate.org/97.html


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 03, 2006 7:14 am 
Regular
Regular

Joined: Tue Feb 24, 2004 11:42 am
Posts: 56
try
<logger name="org.hibernate.SQL">
<level value="DEBUG"/>
</logger>

<logger name="org.hibernate.type">
<level value="DEBUG"/>
</logger>


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.