You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Alexander Picoli (JIRA)" <ji...@apache.org> on 2019/07/25 14:10:00 UTC

[jira] [Commented] (LOG4J2-2556) log4j-1.2-api works only with core

    [ https://issues.apache.org/jira/browse/LOG4J2-2556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16892786#comment-16892786 ] 

Alexander Picoli commented on LOG4J2-2556:
------------------------------------------

In my practical case I was really blindly believing that log4j 1.2 compatibility would rely only on log4j API, not core. After all this *is* what SLF4J does. And it is supposed that log4j 2 API would be a better replacement for slf4j, right?

I've created a new SPI and tried to use it with the log4j 1.2 compatibility layer... Boom! My whole solution idea got down the drain... I'm author of the duplicated 2264 issue...

> log4j-1.2-api works only with core
> ----------------------------------
>
>                 Key: LOG4J2-2556
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2556
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: log4j 1.2 emulation
>    Affects Versions: 2.11.1
>            Reporter: Michael Lipp
>            Priority: Major
>
> The Logger implementation of log4j-1.2-api casts to org.apache.logging.log4j.core.LoggerContext. This works only if the provider of log4j(2) is the default ("core") provider. I have written my own provider that includes its own implementation of a LoggerContext (properly implementing "org.apache.logging.log4j.spi.LoggerContext", of course). So the cast fails.
> IMHO log4j-1.2-api should work with any implementation of a log4j(2) provider.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)