we try to filter logs generated from one class:
com.websudos.phantom
for two goals:
all logs from app saved in the file except log from this calss
all log from this file transferred to graylog.
we have filter those log by regex with this filter:
<filter class="ch.qos.logback.core.filter.EvaluatorFilter">
<evaluator>
<matcher>
<Name>parameter</Name>
<regex>Executing query</regex>
</matcher>
<expression>parameter.matches(formattedMessage)</expression>
</evaluator>
<OnMismatch>DENY</OnMismatch>
<OnMatch>ACCEPT</OnMatch>
</filter>
the Executing query
regex for this class : com.websudos.phantom
and we do not accept to set a level of this class to OFF
because we need this log to transfer to graylog and not saving in the file!
whats a solution?