title: Show logs only from one class using logback
body: <p>I am trying to display logs into console as well as file however in file i want only certain logs that will be displayed from one particular class and i am not sure how to do this. Below is my logback.xml</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE configuration&gt;
  
  &lt;configuration&gt;
  
    &lt;appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"&gt;
          &lt;encoder&gt;
              &lt;pattern&gt;{ "date_time":"%date", "thread":"[%thread]", "log_level":"%-5level", "class_name":"%logger{0}", "log_message":"%msg" }%n&lt;/pattern&gt;
          &lt;/encoder&gt;
      &lt;/appender&gt;
  
    &lt;appender name="FILE" class="ch.qos.logback.core.FileAppender"&gt;
      &lt;file&gt; test.txt &lt;/file&gt;
      &lt;append&gt;false&lt;/append&gt;
      &lt;encoder&gt;
          &lt;pattern&gt;{ "date_time":"%date", "thread":"[%thread]", "log_level":"%-5level", "class_name":"%logger{0}", "log_message":"%msg" }%n&lt;/pattern&gt;
      &lt;/encoder&gt;
    &lt;/appender&gt;
  
    &lt;root level="info"&gt;
      &lt;appender-ref ref="FILE" /&gt;
      &lt;appender-ref ref="STDOUT" /&gt;
    &lt;/root&gt;
  
  &lt;/configuration&gt;
  </code></pre>