[slf4j-dev] Serializable Markers

Sebastien Pennec sebastien at qos.ch
Wed Jan 17 21:25:31 CET 2007


Hi all,

Recently, on the logback project, we implemented two appenders for JMS (Topic and Queue).

When testing those components, we saw that org.slf4j.Marker objects were not 
Serializable, and thus not usable with JMS.

We went on to modify the Marker interface to make it Serializable. Since the 
BasicMarker class had a reference to a IMarkerFactory, used in the 
Marker.contains(String marker) method, we first thought that we would have to make 
IMarkerFactory Serializable, too.

In the Marker class, Marker.contains(String marker) only existed as a convenience 
method for the Marker.contains(Marker marker) method. Furthermore, the former method 
was not used anywhere except in test classes. Therefore, we are willing to deprecate 
the Marker.contains(String marker) method.

This deprecation does not remove any functionality of SLF4J.

Please let me know if you think that this modification may have an important negative 
impact.

Sébastien

-- 
Sébastien Pennec
sebastien at qos.ch

Logback: The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch/



More information about the slf4j-dev mailing list