[
https://issues.apache.org/jira/browse/LOG4J2-172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14193240#comment-14193240
]
Bin Wang commented on LOG4J2-172:
---------------------------------
It seems that JBoss logging has fixed this problem. But hibernate still use the
JBoss logging version 3.1.3.GA instead of the fixed version 3.1.4.GA. I think
the version in dependency should be update.
> Logging doesn't work in Hibernate
> ---------------------------------
>
> Key: LOG4J2-172
> URL: https://issues.apache.org/jira/browse/LOG4J2-172
> Project: Log4j 2
> Issue Type: Bug
> Components: SLF4J Bridge
> Affects Versions: 2.0-beta4
> Environment: OSX, Tomcat 6, Spring, Hibernate
> Reporter: Henry Clout
> Labels: hibernate, slf4j
>
> 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{1}.%M - %m%n"/>
> </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="[email protected]"
> from="[email protected]" smtpHost="mail.kuluvalley.com"
> smtpUsername="[email protected]"
> 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?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]