Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Problem
-
2.0-beta4
-
None
-
OSX, Tomcat 6, Spring, Hibernate
Description
I've been testing a migration from log4j1.x to log4j 2.0 beta 4. So far I've got our application and Spring logging fine using log4j2, but I can't seem to get any output from Hibernate (4). Hibernate uses slf4j, so I've included the bridge, but alas no go.
I've included the following jars :
log4j-api-2.0-beta4.jar
log4j-core-2.0-beta4.jar
log4j-slf4j-impl-2.0-beta4.jar
slf4j-api-1.7.2.jar
slf4j-ext-1.7.2.jar
My log4j2.xml is as follows:
<?xml version="1.0" encoding="UTF-8" ?>
<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/' monitorInterval="5" status="debug">
<appenders>
<Console name="STANDARD_CONSOLE" target="SYSTEM_OUT">
<PatternLayout pattern="%d [%t] %-5p %20c
</Console>
<RollingFile name="FILE_APPENDER" fileName="/Users/henry/Documents/kulu/tools/logs/server.log"
filePattern="/Users/henry/Documents/kulu/tools/logs/server-%i.log">
<PatternLayout>
<pattern>%d [%t] %-5p %20c{1}
.%M - %m%n</pattern>
</PatternLayout>
<Policies>
<SizeBasedTriggeringPolicy size="500000 KB"/>
</Policies>
<DefaultRolloverStrategy max="5"/>
</RollingFile>
<SMTP name="EMAIL_APPENDER" suppressExceptions="false" subject="[KVP] %c
{1}: %m" to="henry.clout@kuluvalley.com"
from="no_reply@kuluvalley.com" smtpHost="mail.kuluvalley.com" smtpUsername="henry.clout@kuluvalley.com"
smtpPassword="pw" bufferSize="10">
<BurstFilter rate="0.1" />
</SMTP>
</appenders>
<loggers>
<logger name="com.kuluvalley" level="warn">
<appender-ref ref="FILE_APPENDER" />
<appender-ref ref="STANDARD_CONSOLE" />
</logger>
<logger name="com.kuluvalley.guru.server.service.common.PackageServiceImpl" level="info">
<appender-ref ref="FILE_APPENDER" />
</logger>
<logger name="org.springframework" level="warn">
<appender-ref ref="FILE_APPENDER" />
</logger>
<logger name="org.springframework.security" level="warn">
<appender-ref ref="FILE_APPENDER" />
</logger>
<logger name="org.apache.cxf" level="info">
<appender-ref ref="FILE_APPENDER" />
</logger>
<logger name="org.hibernate" level="debug">
<appender-ref ref="FILE_APPENDER" />
<appender-ref ref="STANDARD_CONSOLE" />
</logger>
<logger name="org.hibernate.SQL" level="debug">
<appender-ref ref="FILE_APPENDER" />
<appender-ref ref="STANDARD_CONSOLE" />
</logger>
<root level="info">
<appender-ref ref="FILE_APPENDER" />
</root>
</loggers>
</log4j:configuration>
Any thoughts as to what could be wrong?