title: Spring Boot custom logback logger to file only
body: <p>I've got a pair of custom loggers defined for LogBack in a Spring Boot application.  The idea is to send all of that logging to a file, instead of the standard console output provided by Spring Boot by default.  What I'm seeing is that the logging goes to both the custom file AND the console, and I cannot find any reason for that to happen.  All logging to the two custom appenders is at DEBUG and/or TRACE level.  I have set logging.level.root=INFO, thinking that would prevent this logging from showing up, but that didn't help.</p>
  
  <p>I do have the standard Spring Boot logging configured for use in the application.  So logging.path and logging.file are both set.</p>
  
  <p>Any help appreciated.</p>
  
  <p>Here is my custom logback-spring.xml file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!--
      LogBack configuration used by all services to create separate files for TRACE and SOAP logs. 
  --&gt;
  &lt;configuration&gt;
      &lt;!-- Include the basic Spring-Boot logback configuration. --&gt;
      &lt;include resource="org/springframework/boot/logging/logback/base.xml"/&gt;
  
      &lt;!-- An appender and logger for TRACE logging of method calls --&gt;
      &lt;appender name="TraceLoggingAppender" class="ch.qos.logback.core.FileAppender"&gt;
          &lt;file&gt;${LOG_PATH}/logs/trace.log&lt;/file&gt;
          &lt;encoder&gt;
              &lt;pattern&gt;${FILE_LOG_PATTERN}&lt;/pattern&gt;
          &lt;/encoder&gt;
      &lt;/appender&gt;
  
      &lt;logger name="TraceLogging" additivity="false" level="trace"&gt;
          &lt;appender-ref ref="TraceLoggingAppender"/&gt;
      &lt;/logger&gt;
  
      &lt;!-- An appender and logger for SOAP envelope logging --&gt;
      &lt;appender name="SoapLoggingAppender" class="ch.qos.logback.core.FileAppender"&gt;
          &lt;file&gt;${LOG_PATH}/logs/soap.log&lt;/file&gt;
          &lt;encoder&gt;
              &lt;pattern&gt;${FILE_LOG_PATTERN}&lt;/pattern&gt;
          &lt;/encoder&gt;
      &lt;/appender&gt;
  
      &lt;logger name="SoapLogging" additivity="false" level="debug"&gt;
          &lt;appender-ref ref="SoapLoggingAppender"/&gt;
      &lt;/logger&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>And an example usage:</p>
  
  <pre><code>private static final Log LOG = LogFactory.getLog("SoapLogging");
  ...
  LOG.debug(soapMessage);
  </code></pre>