Re: Log4j 1.2.x Customer Appender not used as "Plugin" by Log4j 1.2 Bridge

"Piotr P. Karwasz" <[email protected]>
Newsgroups gmane.comp.jakarta.log4j.user
Message-ID <CAFmygFYTWGg0iO8K_KAAVoSDTOMcUQ_tw2CYZHfDz==CETC95A@mail.gmail.com>
Hello Pablo,

On Tue, 29 Mar 2022 at 19:58, Pablo Rogina <[email protected]> wrote:
> However this warning appears (application launched with -Dlog4j2.debug=true):
> WARN StatusLogger Unable to load plugin class name
> com.mycompany.log4j.CustomAppender with key
> com.mycompany.log4j.customappender

This is an expected behavior. Most common Log4j 1.x components are
actually translated into their Log4j 2.x equivalents using
configuration builder plugins. See [1] for example. If you were using
"standard" Log4j 1.x components (e.g. org.apache.log4j.FileAppender),
this warning means that the system is using the real
org.apache.log4jFileAppender class instead of its Log4j 2.x
equivalent, which might result in poor performance.

You can actually also write such a builder plugin yourself, if you
wish to use a Log4j 1.x configuration to start your custom Log4j 2.x
appender.

Piotr

[1] https://github.com/apache/logging-log4j2/blob/release-2.x/log4j-1.2-api/src/main/java/org/apache/log4j/builders/appender/RollingFileAppenderBuilder.java
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.