You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Gary Gregory (JIRA)" <ji...@apache.org> on 2019/02/26 13:40: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=16777916#comment-16777916 ] 

Gary Gregory commented on LOG4J2-2556:
--------------------------------------

[~drmlipp],

The log4j-1.2-api module was designed to provide compatibility to 1.2 call sites backed by our log4j-core implementation, as opposed to an SPI implemented by log4j-core. If you can provide a PR to make it work like an SPI, I think that would be neat. I wonder what others think.

Gary

> 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.3#76005)