logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guy Marom <marom....@gmail.com>
Subject Context-wide filter not working for me
Date Tue, 06 Dec 2016 19:59:39 GMT
Hello everyone,

I have a problem with activating a context-wide filter. I created my own
filter, made it inherit from *AbstractFilter* and then overridden the
method

public Result filter(LogEvent event)

This method was never called so I decided to try with an existing filter,
here's my config file:

<configuration monitorInterval="5">
  <!--<MetricWritingFilter />-->
  <ThresholdFilter level="TRACE" onMatch="DENY" onMismatch="DENY"/>

  <appenders>
    <console name="stdout" target="SYSTEM_OUT">
      <patternLayout pattern="%d{ABSOLUTE} %5p %c{1}:%L - %m%n"/>
    </console>
  </appenders>

  <loggers>
    <logger name="com.outbrain.test" level="info" />
    <root level="error">
      <!--<appenderRef ref="wfePartitionedJobAppender"/>-->
      <appenderRef ref="stdout"/>
    </root>
  </loggers>
</configuration>


The filter works but when I put a breakpoint inside the ThresholdFilter
class I see it doesn't stop in the method I mentioned earlier:
[image: Inline image 1]

Am I missing something here?

Thanks,
Guy Marom

Mime
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message