title: Play 2.6 [Scala]: How to access the content of the log during a test?
body: <p>Lets say I have a route <code>/log</code> that triggers the <code>MyController.iDoLogSometimes</code> controller method:</p>
  
  <pre><code>class MyController extends Controller{
    def iDoLogSometimes = Action{
      request =&gt; 
       val hasProperty: Boolean = ??? //A request property check
       if(hasProperty) Logger.info("prop exist")
       else Logger.debug("prop does not exist")   
    }
  }
  </code></pre>
  
  <p>Now, within a test I can send a <code>FakeRequest</code> with whatever properties I need; to cover both cases within my method. 
  However I dont know how I can capture the <code>Logger</code> output and use some kind of <code>must</code> matcher for it.</p>
  
  <p>Note that I do have <code>logback.xml</code> in my <code>conf/</code> folder; and I do see the log in the console; during the run of the test. </p>