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.