[slf4j-user] Classes in org.slf4j.helpers: API? SPI? Neither?
ceki
ceki at qos.ch
Fri Feb 15 12:05:12 CET 2013
Hi Dale,
You mean the changes in commit [1] made on April 9th 2010? Version
1.6.0 was released on May 8th 2010, a few weeks after the commit in
question.
The release notes for 1.6.0 state:
In the presence of multiple parameters and if the last argument in a
logging statement is an exception, then SLF4J will now presume that
the user wants the last argument to be treated as an exception and not
a simple parameter. See the relevant FAQ entry for further details.
This fixes bug 70 submitted by Joern Huxhorn who also provided the
relevant patch.
The log method in LocationAwareLogger interface now admits an
additional parameter of type Object[] representing additional
arguments of the log request. Due to this modification, slf4j-api
version 1.6.x will not work with bindings shipping with SLF4J 1.5.x --
bindings shipping with 1.6.x must be used.
=====
In short, slf4j-api version 1.6.x does not work with earlier slf4j
bindings even if its public API remained the same.
To answer your question, the "helpers" package are considered the same
as "spi" package with regards to compatibility. Classes may change
breaking compatibility with bindings. However, the sacrosanct client
compatibility is always preserved [2]:
From the client's perspective all versions of slf4j-api are
compatible. Client code compiled with slf4j-api-N.jar will run
perfectly fine with slf4j-api-M.jar for any N and M. You only need to
ensure that the version of your binding matches that of the
slf4j-api.jar. You do not have to worry about the version of
slf4j-api.jar used by a given dependency in your project. You can
always use any version of slf4j-api.jar, and as long as the version of
slf4j-api.jar and its binding match, you should be fine.
Does this help?
[1] https://github.com/qos-ch/slf4j/commit/3c0ab3466b6fa6e91597
[2] http://slf4j.org/codes.html#version_mismatch
Regards,
--
Ceki
http://twitter.com/#!/ceki
On 14.02.2013 13:40, Dale Wijnand wrote:
> Hi,
> I was wondering if the classes under org.slf4j.helpers (such as
> MessageFormatter) are to be considered:
> * Public API
> * SPI (for binding modules)
> * Internal code
>
> I ask, because MessageFormatter#format(String, Object) broken
> compatibility in v1.6..
>
> Thanks in advance,
> Dale
>
More information about the slf4j-user
mailing list