[slf4j-dev] [JIRA] (SLF4J-432) log4j-over-slf4j calls wrong methods when marker parameter is null
QOS.CH (JIRA)
noreply-jira at qos.ch
Mon Mar 26 18:44:01 CEST 2018
Rufus created SLF4J-432:
---------------------------
Summary: log4j-over-slf4j calls wrong methods when marker parameter is null
Key: SLF4J-432
URL: https://jira.qos.ch/browse/SLF4J-432
Project: SLF4J
Issue Type: Bug
Components: log4j-over-slf4j
Reporter: Rufus
Assignee: SLF4J developers list
Priority: Minor
The org.slf4j.Logger interface has with-Marker and without-Marker versions of each logging method,
e.g.
public void trace(Marker marker, String format, Object arg);
vs
public void trace(String format, Object arg);
However, the differentiatedLog method in log4j-over-slf4j ignores this and always calls the method *with* the Marker argument, even when there is no Marker. Logger implementations are then forced to defensively check for null Markers because of this error.
log4j-over-slf4j should instead call the correct (without-Marker) method when there is no Marker.
Patch: https://github.com/qos-ch/slf4j/pull/190/
--
This message was sent by Atlassian JIRA
(v7.3.1#73012)
More information about the slf4j-dev
mailing list