Is it possible to use Log4j 2's much richer feature set as is? Perhaps you
could explain what is it your old appender does that requires custom code.


On Fri, Aug 12, 2022, 15:35 Joel Griffith <> wrote:

> I have a Java application containing a package written to use Log4j v1.  I
> am struggling to update this package to use Log4j v2 to remediate its
> security vulnerabilities.
> The package contains a custom Appender that subclasses Log4j v1's
> FileAppender.  I am stumped at how to convert this file to Log4j v2.  In
> Log4j v2, the FileAppender class is 'final' and cannot be subclassed, so I
> cannot create a new version of the custom Appender that mirrors the first.
> More importantly, perhaps, is that the Log4j v2 FileAppender is a Plugin
> and completely different in structure from the Log4j v1 FileAppender.
> I found this page that ostensibly explains how to extend Log4j:
> but it contains no information about actually extending Appenders or
> procedures for accomplishing an equivalent goal.
> Is there any reasonable way of converting this custom Appender from Log4j
> v1 to v2?
> Thanks,
> Joel

Reply via email to