logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Sicker <boa...@gmail.com>
Subject Re: Configuration for custom Filter
Date Tue, 23 Feb 2016 00:48:56 GMT
Is your filter annotated with @Plugin? Does the class provide a
@PluginFactory static method or a @PluginBuilderFactory builder class? How
are you building your project? Because if you use your IDE instead of
Maven/Gradle/etc., you also have to enable annotation processing to build
up a metadata file for your plugins, or else you need to specify the
package to scan for your custom plugins in the config file (e.g.,
<Configuration package="com.foo.plugins">). Take a look at any of the
standard filters (like LevelRangeFilter) for an example of everything you
need to do.

On 22 February 2016 at 18:20, Tara Czutno <javaworkinggirl@gmail.com> wrote:

> What configuration do I need in my log4j2.xml to use a custom Filter?
>
> Do I need to "register" the filter with log4j2 somehow to use it?
>
> Tara
>



-- 
Matt Sicker <boards@gmail.com>

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