Hello, i have a problem with the hibernate logging. I have a war with GWT and spring and a EAR with EJB3 + JPA 2 + Hibernate + Spring. Everything is deployed on WebLogic 12c The problem is that i have to use for my application a log4j xml file that MUST be named so: flowapp-log4j-2.0.xml. I have 4 appenders in this configuration file and it logs everything unless Hibernate, it creates the file but it doesn't write anything.
This is my configuration file:
<?xml version="1.0" encoding="UTF-8"?> <log4j:configuration debug="false" threshold="all" xmlns:log4j="http://jakarta.apache.org/log4j/"> <appender name="GACONSOLE_LOGGER" class="it.reply.sytel.flowapp.logging.EAIInMemoryDailyRollingFileAppender"> <param name="Append" value="true" /> <param name="ImmediateFlush" value="true" /> <param name="BufferedIO" value="false" /> <param name="BufferSize" value="4096" /> <param name="DatePattern" value="yyyy-MM-dd" /> <param name="File" value="/gs-console-shared-log/GSCONSOLE-WEB-${weblogic.Name}.$.log" /> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="[%d{dd MMM yyyy HH:mm:ss,SSS}] %-4r [%t] %-5p %c %x - %m%n" /> </layout> </appender> <appender name="GACONSOLE_EJB_LOGGER" class="it.reply.sytel.flowapp.logging.EAIInMemoryDailyRollingFileAppender"> <param name="Append" value="true" /> <param name="ImmediateFlush" value="true" /> <param name="BufferedIO" value="false" /> <param name="BufferSize" value="4096" /> <param name="DatePattern" value="yyyy-MM-dd" /> <param name="File" value="/gs-console-shared-log/GSCONSOLE-EJB-${weblogic.Name}.$.log" /> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="[%d{dd MMM yyyy HH:mm:ss,SSS}] %-4r [%t] %-5p %c %x - %m%n" /> </layout> </appender>
<appender name="SPRING_LOGGER" class="it.reply.sytel.flowapp.logging.EAIInMemoryDailyRollingFileAppender"> <param name="Append" value="true" /> <param name="ImmediateFlush" value="true" /> <param name="BufferedIO" value="false" /> <param name="BufferSize" value="4096" /> <param name="DatePattern" value="yyyy-MM-dd" /> <param name="File" value="/gs-console-shared-log/GSCONSOLE-SPRING-${weblogic.Name}.$.log" /> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="[%d{dd MMM yyyy HH:mm:ss,SSS}] %-4r [%t] %-5p %c %x - %m%n" /> </layout> </appender>
<appender name="HIBERNATE_LOGGER" class="it.reply.sytel.flowapp.logging.EAIInMemoryDailyRollingFileAppender"> <param name="Append" value="true" /> <param name="ImmediateFlush" value="true" /> <param name="BufferedIO" value="false" /> <param name="BufferSize" value="4096" /> <param name="DatePattern" value="yyyy-MM-dd" /> <param name="File" value="/gs-console-shared-log/GSCONSOLE-HIBERNATE-${weblogic.Name}.$.log" /> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="[%d{dd MMM yyyy HH:mm:ss,SSS}] %-4r [%t] %-5p %c %x - %m%n" /> </layout> </appender>
<!-- Loggers for XAWES Multimedia Content Server --> <logger additivity="false" name="it.reply.sytel.gs.gaconsole"> <level class="it.reply.sytel.flowapp.gs.logging.TILevel" value="INFO"/> <appender-ref ref="GACONSOLE_LOGGER" /> </logger>
<logger additivity="false" name="it.reply.sytel.gaconsoleejb"> <level class="it.reply.sytel.flowapp.gs.logging.TILevel" value="INFO"/> <appender-ref ref="GACONSOLE_EJB_LOGGER" /> </logger> <logger additivity="false" name="org.springframework"> <level value="ERROR"/> <appender-ref ref="SPRING_LOGGER" /> </logger> <logger additivity="false" name="org.hibernate"> <level value="ERROR"/> <appender-ref ref="HIBERNATE_LOGGER" /> </logger> </log4j:configuration>
These are my maven dependecies on the ejb project
antlr-2.7.4.jar commons-codec-1.4.jar commons-collections-3.2.jar commons-exec-1.0.1.jar commons-io-2.0.jar commons-lang-2.5.jar commons-logging-1.1.jar commons-pool-1.5.4.jar dom4j-core-1.4-dev-8.jar flowapp-lib-foundation-2.0.jar hibernate-commons-annotations-3.2.0.Final.jar hibernate-core-3.6.9.jar hibernate-entitymanager-3.6.9.jar hibernate-jpa-2.0-api-1.0.1.jar javaee-api-6.0.jar javassist-3.3.jar jaxen-1.1.1.jar junit-4.8.1.jar log4j-1.2.16.jar ojdbc6-11.2.0.1.0.jar serializer-2.7.1.jar slf4j-api-1.6.4.jar slf4j-log4j12-1.6.4.jar spring-asm-3.0.1.RELEASE.jar spring-beans-3.0.1.RELEASE.jar spring-context-3.0.1.RELEASE.jar spring-core-3.0.1.RELEASE.jar spring-dao-2.0.8.jar spring-expression-3.0.1.RELEASE.jar spring-jdbc-3.0.1.RELEASE.jar spring-orm-3.0.1.RELEASE.jar spring-tx-3.0.1.RELEASE.jar spring-web-3.0.1.RELEASE.jar xalan-2.7.1.jar xercesImpl-2.9.1.jar xml-apis-1.3.04.jar xml-resolver-1.2.jar
When i deploy the EJB Ear on Server, i can see hibernate logging on the system out of the server, but it doesn't logs on the file. Can anybody please help me? Thanks in advance! :)
|