7 Replies Latest reply on May 6, 2014 6:50 AM by Meriam Jab

    Why can't I get Spring or hibernate TRACE logs in AS7?

    techsjs2012 Newbie

      Why can't I get Spring or hibernate TRACE logs in AS7?

       

      I have a jboss-deployment-structure.xml file under WEB-INF:

      <jboss-deployment-structure>

          <deployment>

              <!-- Exclusions allow you to prevent the server from automatically adding some dependencies -->

              <exclusions>

                  <module name="org.apache.log4j" />

              </exclusions>

          </deployment>

      </jboss-deployment-structure>

       

      and here is my log4j.xml

      <?xml version="1.0" encoding="UTF-8" ?>

      <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

      <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">

       

          <appender name="console" class="org.apache.log4j.ConsoleAppender">

              <layout class="org.apache.log4j.PatternLayout">

                  <param name="ConversionPattern" value="%d [%t] %-5p %c - %m%n" />

              </layout>

          </appender>

       

       

          <appender name="dailyrollinglogfile" class="org.apache.log4j.DailyRollingFileAppender">

              <param name="file" value="./memberinquiry.log" />

              <param name="immediateFlush" value="true" />

              <param name="append" value="true" />

              <param name="datePattern" value="'.'yyyy-MM-dd" />

              <layout class="org.apache.log4j.PatternLayout">

                  <param name="ConversionPattern" value="%d [%t] %-5p %c - %m%n" />

              </layout>

          </appender>

       

          <appender name="email" class="org.apache.log4j.net.SMTPAppender">

              <param name="BufferSize" value="512" />

              <param name="SMTPHost" value="svmx01.uftmasterad.org" />

              <param name="From" value="memberinquiry@uftmasterad.org" />

              <param name="To" value="admin@uft.org" />

              <param name="Subject" value="Member Inquiry Web - SYSTEM ERROR" />

       

              <layout class="org.apache.log4j.PatternLayout">

                  <param name="ConversionPattern" value="%d %-5p %c - %m%n" />

              </layout>

       

              <filter class="org.apache.log4j.varia.LevelRangeFilter">

                  <param name="LevelMin" value="ERROR" />

                  <param name="LevelMax" value="FATAL" />

              </filter>

          </appender>

       

          <logger name="org.springframework">

              <level value="ALL"/>

              <appender-ref ref="console"/>

          </logger>

       

          <logger name="org.springframework.web">

          <level value="trace"/>

              <appender-ref ref="console"/>

          </logger>

       

          <logger name="org.hibernate.type">

              <level value="trace"/>

              <appender-ref ref="console"/>

          </logger>

       

          <root>

              <priority value="WARN"/>

              <appender-ref ref="email"/>

              <appender-ref ref="console"/>

              <appender-ref ref="dailyrollinglogfile"/>

          </root>

      </log4j:configuration>