logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Sicker (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (LOG4J2-793) Log4jLogger only accepts Log4jMarker, not SLF4J's Marker
Date Tue, 26 Aug 2014 03:53:58 GMT

     [ https://issues.apache.org/jira/browse/LOG4J2-793?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Matt Sicker resolved LOG4J2-793.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1

Fixed in trunk. Please verify and close. Note that if your custom marker implementation contains
cycles (via children/referent markers), then you're bound to get an infinite loop. I don't
think that's supported anyhow, but I could be wrong.

> Log4jLogger only accepts Log4jMarker, not SLF4J's Marker
> --------------------------------------------------------
>
>                 Key: LOG4J2-793
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-793
>             Project: Log4j 2
>          Issue Type: Bug
>    Affects Versions: 2.0.1
>            Reporter: Manfred Dohmen
>            Assignee: Matt Sicker
>            Priority: Minor
>             Fix For: 2.1
>
>
> We're using Log4j 2 via SLF4J. A Logger's log methods have signatures like this:
> public abstract void warn(org.slf4j.Marker marker, java.lang.String msg)
> If you use an object that is an Marker but not a Log4jMarker this fails at org.apache.logging.slf4j.Log4jLogger.getMarker(Log4jLogger.java:378)
due to "cannot be cast to org.apache.logging.slf4j.Log4jMarker".
> Use case: we have a defined set of Markers. There's an enum for this, implementing SLF4J's
marker interface. Obviously with Log4j we cannot use this enum.
> I think an org.apache.logging.slf4j.Log4jLogger cannot expect an org.apache.logging.slf4j.Log4jMarker.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message