title: Spring Boot application does not write logs into logging file on Wildfly 14
body: <p>I have deployed my Spring Boot appication WAR file onto Wildfly 14.0.1. In this application I need to write logs in specific file. I use configuration defined in logback.xml</p>
  
  <p>logback.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;configuration&gt;
  
      &lt;appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"&gt;
          &lt;layout class="ch.qos.logback.classic.PatternLayout"&gt;
              &lt;Pattern&gt;
                  %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n
              &lt;/Pattern&gt;
          &lt;/layout&gt;
      &lt;/appender&gt;
  
      &lt;appender name="FILE-AUDIT" class="ch.qos.logback.core.rolling.RollingFileAppender"&gt;
          &lt;file&gt;myProject_audit.log&lt;/file&gt;
          &lt;encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"&gt;
              &lt;Pattern&gt;
                  %d{yyyy-MM-dd HH:mm:ss};%msg%n
              &lt;/Pattern&gt;
          &lt;/encoder&gt;
  
          &lt;rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"&gt;
              &lt;!-- rollover daily --&gt;
              &lt;fileNamePattern&gt;myProject_audit.%d{yyyy-MM-dd}.%i.log&lt;/fileNamePattern&gt;
              &lt;timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"&gt;
                  &lt;maxFileSize&gt;100MB&lt;/maxFileSize&gt;
              &lt;/timeBasedFileNamingAndTriggeringPolicy&gt;
          &lt;/rollingPolicy&gt;
      &lt;/appender&gt;
  
  
      &lt;logger name="audit-log" level="info" additivity="false"&gt;
          &lt;appender-ref ref="FILE-AUDIT"/&gt;
          &lt;appender-ref ref="STDOUT"/&gt;
      &lt;/logger&gt;
  
      &lt;root level="error"&gt;
          &lt;appender-ref ref="STDOUT"/&gt;
          &lt;appender-ref ref="FILE"/&gt;
      &lt;/root&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Inside bussiness class there's following:</p>
  
  <pre><code>public class Service1Controller {
      private static  Logger LOGGER = LoggerFactory.getLogger("audit-log");
  
      public ResponseEntity getList(){
  
          LOGGER.info("Inside Service1 getList");
  
          List&lt;String&gt; list = new ArrayList&lt;&gt;();
          list.add("Spain");
          list.add("China");
          list.add("France");
          list.add("USA");
  
          LOGGER.info("Printing service1 list " + list);
  
          return ResponseEntity.ok(list);
  
      }
  
  }
  </code></pre>
  
  <p>my pom.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;kz.djadiv&lt;/groupId&gt;
      &lt;artifactId&gt;demo-jboss-logging&lt;/artifactId&gt;
      &lt;version&gt;1.0&lt;/version&gt;
      &lt;packaging&gt;war&lt;/packaging&gt;
  
      &lt;parent&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
          &lt;version&gt;LATEST&lt;/version&gt;
      &lt;/parent&gt;
  
      &lt;profiles&gt;
          &lt;profile&gt;
              &lt;id&gt;dev&lt;/id&gt;
              &lt;dependencies&gt;
                  &lt;dependency&gt;
                      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                      &lt;artifactId&gt;spring-boot-starter-tomcat&lt;/artifactId&gt;
                  &lt;/dependency&gt;
              &lt;/dependencies&gt;
          &lt;/profile&gt;
      &lt;/profiles&gt;
  
      &lt;properties&gt;
          &lt;java.version&gt;1.8&lt;/java.version&gt;
      &lt;/properties&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
              &lt;exclusions&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                      &lt;artifactId&gt;spring-boot-starter-tomcat&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
              &lt;/exclusions&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
              &lt;artifactId&gt;javax.servlet-api&lt;/artifactId&gt;
              &lt;version&gt;3.1.0&lt;/version&gt;
          &lt;/dependency&gt;
  
      &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>After deployment to Wildfly the file myProject_audit.log (as I defined it in logback.xml) is being created. But there's nothing inside. None line of logs.</p>
  
  <p>I tried to add src/main/resources/META-INF/jboss-deployment-structure.xml with following:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;jboss-deployment-structure&gt;
      &lt;deployment&gt;
          &lt;exclusions&gt;
              &lt;module name="org.apache.commons.logging" /&gt;
              &lt;module name="org.apache.log4j" /&gt;
              &lt;module name="org.jboss.logging" /&gt;
              &lt;module name="org.jboss.logging.jul-to-slf4j-stub" /&gt;
              &lt;module name="org.jboss.logmanager" /&gt;
              &lt;module name="org.jboss.logmanager.log4j" /&gt;
              &lt;module name="org.slf4j" /&gt;
              &lt;module name="org.slf4j.impl" /&gt;
          &lt;/exclusions&gt;
      &lt;/deployment&gt;
  &lt;/jboss-deployment-structure&gt;
  </code></pre>
  
  <p>But nothing changed</p>