title: How to filter only a specific query log in spring (logback.xml)
body: <p>I am using logback-spring.xml file to log sql results. And also I use "SqlSessionTemplate" as a common jdbcTemplate to write sql queries and get data from database.
  In this situation, I need to except some logs because it has a lot of data which is loaded when server booted and useless. But as I mentioned above, I use the same templates so I don't know how to filter only that query from logging.
  I have tried to filter it as I make a Interceptor like below.</p>
  
  <p>logback-spring.xml</p>
  
  <pre><code>&lt;appender name="STDOUT-SQL-RESULTSET" class="ch.qos.logback.core.ConsoleAppender"&gt;
      &lt;filter class="com.common.interceptor.LogbackInterceptor" /&gt;
          &lt;encoder&gt;
              &lt;charset&gt;UTF-8&lt;/charset&gt;
              &lt;pattern&gt;%msg%n&lt;/pattern&gt;
          &lt;/encoder&gt;
  &lt;/appender&gt;
  </code></pre>
  
  <p>LogbackInterceptor.java</p>
  
  <pre><code>public class LogbackInterceptor extends Filter&lt;ILoggingEvent&gt; {
  
      @Override
      public FilterReply decide( ILoggingEvent event ) {
          if (event.getMessage().contains("NOT_SQL_LOG")) {
              return FilterReply.DENY;
          }else{
              return FilterReply.ACCEPT;
          }
      }
  }
  </code></pre>
  
  <p>messageSql.xml</p>
  
  <pre><code>&lt;select id="retrieveMessage" parameterType="String" resultType="Message"&gt;
    -- NOT_SQL_LOG
    SELECT blahblah ~~
  </code></pre>
  
  <p>As the result has many rows, only the comment line "-- NOT_SQL_LOG" was skipped and the other queries and results all came out to console log.</p>
  
  <p>And when I tired EvaluatorFilter, server didn't start leaving message like "[main] DEBUG org.springframework.boot.devtools.restart.ChangeableUrls - Matching URLs for reloading"</p>
  
  <pre><code>&lt;filter class="ch.qos.logback.core.filter.EvaluatorFilter"&gt;
          &lt;evaluator&gt;
              &lt;expression&gt;return message.contains("NOT_SQL_LOG");&lt;/expression&gt;
          &lt;/evaluator&gt;
          &lt;OnMismatch&gt;NEUTRAL&lt;/OnMismatch&gt;
          &lt;OnMatch&gt;DENY&lt;/OnMatch&gt;
  &lt;/filter&gt;
  </code></pre>
  
  <p>Please help me to filter specific queries not to be written.
  Thank you for your help in advance.</p>