Re: java.lang.ClassCastException: org.apache.log4j.bridge.AppenderWrapper cannot be cast to org.apache.log4j.FileAppender
"Piotr P. Karwasz" <[email protected]>
| Newsgroups | gmane.comp.jakarta.log4j.user |
|---|---|
| Message-ID | <CAFmygFYMEamw6FA3WJB0VtPF1qTgn3sOPXc=nA15Ecce+Ck4jg@mail.gmail.com> |
On Fri, Mar 4, 2022 at 7:32 PM Ralph Goers <[email protected]> wrote: > I am a little surprised though as it looks like Gary added the Log4j 1.2 FileAppender to log4j-1.2-api but he didn’t remove the builder. If he had it would have created org.apache.log4j.FileAppender as you want. The `org.apache.log4j.FileAppender` class is useful to inherit from it. I have successfully tested the `RollingFileAppender` from Apache Log4j Extras as native Log4j 1.x appender (there is no builder for this one) running through the bridge. I don't believe we actually want to use `org.apache.log4j.FileAppender` instead of `org.apache.logging.log4j.core.appender.FileAppender`. I suppose that the latter gives a better performance. Piotr