title: Spring boot log settings in application.yml
body: <p>I'm building a spring boot application. I use logstash to create structured logs, and this works great. However, I'm trying to move the following <code>logback.xml</code> to <code>application.yml</code>.</p>
  
  <pre><code>&lt;configuration&gt;
      &lt;appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"&gt;
          &lt;encoder class="net.logstash.logback.encoder.LogstashEncoder" /&gt;
      &lt;/appender&gt;
  
      &lt;root level="info"&gt;
          &lt;appender-ref ref="STDOUT" /&gt;
      &lt;/root&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>I can't find any tutorial or example that comes remotely close to getting this in <code>application.yml</code>.</p>
  
  <p>furthermore I noticed the following. If I remove <code>logback.xml</code> and put the following in <code>application.yml</code></p>
  
  <pre><code>spring:
    logging:
      level:
        ROOT: WARNING
  </code></pre>
  
  <p>According to <a href="https://stackoverflow.com/questions/31290204/set-root-logging-level-in-application-yml">this</a> question, I should at least have control over my log level. No dice, info's getting logged all over the place.</p>
  
  <p>So, questions:</p>
  
  <ul>
  <li>How do I specify the ROOT log level properly in <code>application.yml</code>?</li>
  <li>How do I specify logstash encoder properly in <code>application.yml</code>?</li>
  </ul>