title: Logback RollingFileAppender does not log Hibernate messages
body: <p>I have the following logback.xml:</p>
  
  <p></p>
  
  <pre><code>&lt;appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"&gt;
      &lt;encoder&gt;
          &lt;pattern&gt;%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
          &lt;/pattern&gt;
      &lt;/encoder&gt;
  &lt;/appender&gt;
  
  &lt;appender name="FILE"
      class="ch.qos.logback.core.rolling.RollingFileAppender"&gt;
      &lt;file&gt;C:/logs/external-web-services.log&lt;/file&gt;
      &lt;rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"&gt;
          &lt;!-- daily rollover --&gt;
          &lt;fileNamePattern&gt;C:/logs/external-web-services.%d{yyyy-MM-dd}.log
          &lt;/fileNamePattern&gt;
          &lt;maxHistory&gt;30&lt;/maxHistory&gt;
      &lt;/rollingPolicy&gt;
      &lt;append&gt;true&lt;/append&gt;
      &lt;encoder&gt;
          &lt;pattern&gt;%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
          &lt;/pattern&gt;
      &lt;/encoder&gt;
  &lt;/appender&gt;
  
  &lt;logger name="org.hibernate.SQL" additivity="false"&gt;
      &lt;level value="DEBUG" /&gt;
      &lt;appender-ref ref="FILE" /&gt;
  &lt;/logger&gt;
  
  &lt;logger name="org.hibernate.type" additivity="false"&gt;
      &lt;level value="DEBUG" /&gt;
      &lt;appender-ref ref="FILE" /&gt;
  &lt;/logger&gt;
  
  &lt;root level="DEBUG"&gt;
      &lt;appender-ref ref="STDOUT" /&gt;
      &lt;appender-ref ref="FILE" /&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p></p>
  
  <p>I want to log Hibernate sql queries in my log file. I only see Hibernate queries in console when running from Eclipse (also in JBoss log file server.log, but this is something else I do not understand). In my log file (external-web-services.log) only my log messages are printed. No Hibernate message is ever printed. In eclipse I get the following:</p>
  
  <pre><code>11:50:05,367 INFO  [stdout] (default task-9) Hibernate: 
  11:50:05,367 INFO  [stdout] (default task-9)     select
  11:50:05,367 INFO  [stdout] (default task-9)         ftibssettl0_.settlcycleinstanceid as settlcycleinstance1_3_,
  11:50:05,367 INFO  [stdout] (default task-9)         ftibssettl0_.endtime as endtime2_3_,
  11:50:05,367 INFO  [stdout] (default task-9)         ftibssettl0_.PARTSET_0_PART as PARTSET_3_3_,
  11:50:05,367 INFO  [stdout] (default task-9)         ftibssettl0_.PARTSET_1_PART as PARTSET_4_3_,
  11:50:05,367 INFO  [stdout] (default task-9)         ftibssettl0_.PARTSET_2_PART as PARTSET_5_3_,
  11:50:05,367 INFO  [stdout] (default task-9)         ftibssettl0_.PARTSET_3_PART as PARTSET_6_3_,
  11:50:05,367 INFO  [stdout] (default task-9)         ftibssettl0_.PARTSET_4_PART as PARTSET_7_3_,
  11:50:05,367 INFO  [stdout] (default task-9)         ftibssettl0_.settlcycletemplateid as settlcycletemplate8_3_,
  11:50:05,368 INFO  [stdout] (default task-9)         ftibssettl0_.settlementdate as settlementdate9_3_,
  11:50:05,368 INFO  [stdout] (default task-9)         ftibssettl0_.starttime as starttime10_3_,
  11:50:05,368 INFO  [stdout] (default task-9)         ftibssettl0_.status as status11_3_ 
  11:50:05,368 INFO  [stdout] (default task-9)     from
  11:50:05,368 INFO  [stdout] (default task-9)         ibsprod.FT_IBS_SETTL_CYCLE_INSTANCE ftibssettl0_ 
  11:50:05,368 INFO  [stdout] (default task-9)     where
  11:50:05,368 INFO  [stdout] (default task-9)         ftibssettl0_.settlementdate=?
  
  11:50:05,417 INFO  [stdout] (default task-9) 11:50:05.417 [default task-9] DEBUG g.d.n.s.CashMovementReportService - filterAndMarkCashMovements elapsed time: PT0.017S
  </code></pre>
  
  <p>What is strange about this log is that the format of the Hibernate message is not the format that I define in logback.xml encoder pattern, which can be seen in the last line of the log, which is my application's log message</p>
  
  <p>Other Info:</p>
  
  <p>I am using JBoss so I need to exclude JBoss own logging subsystem so that logback works, I am using the file jboss-deployment-structure.xml:</p>
  
  <pre><code>&lt;jboss-deployment-structure&gt;
    &lt;deployment&gt;
      &lt;exclude-subsystems&gt;
          &lt;subsystem name="logging" /&gt;
      &lt;/exclude-subsystems&gt;
    &lt;/deployment&gt;
  &lt;/jboss-deployment-structure&gt;
  </code></pre>
  
  <p>I am using JPA so in case this might help this is my persistence.xml file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
  &lt;persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence
  http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"
  version="2.1"&gt;
  
  &lt;persistence-unit name="external-ws" transaction-type="JTA"&gt;
      &lt;description&gt;Oracle Persistence Unit&lt;/description&gt;
      &lt;provider&gt;org.hibernate.ejb.HibernatePersistence&lt;/provider&gt;
      &lt;jta-data-source&gt;${ds.name}&lt;/jta-data-source&gt;
      &lt;exclude-unlisted-classes&gt;false&lt;/exclude-unlisted-classes&gt;
      &lt;properties&gt;
          &lt;property name="hibernate.default_schema" value="${ds.schema}"/&gt;
          &lt;property name="hibernate.show_sql" value="true" /&gt;
          &lt;property name="hibernate.format_sql" value="true" /&gt;
          &lt;property name="org.hibernate.flushMode" value="manual"/&gt;
      &lt;/properties&gt;
  &lt;/persistence-unit&gt;
  </code></pre>
  
  <p></p>