logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guy Marom <marom....@gmail.com>
Subject Re: Context-wide filter not working for me
Date Wed, 07 Dec 2016 04:21:53 GMT
Attached the debug-level output.
Also - the annotations are not relevant since I'm currently not using my
filter but the ThresholdFilter which I assume is written correctly :)
Thanks,
Guy

On Tue, Dec 6, 2016 at 10:18 PM, Matt Sicker <boards@gmail.com> wrote:

> Can you set status="debug" in your <configuration/> element? Also, did you
> remember to add all the necessary annotations on your plugin along with
> enabling annotation processing if needed?
>
> On 6 December 2016 at 13:59, Guy Marom <marom.guy@gmail.com> wrote:
>
> > 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
> >
>
>
>
> --
> Matt Sicker <boards@gmail.com>
>

Mime
View raw message