[slf4j-dev] [Bug 31] Varargs for Logger methods

bugzilla-daemon at pixie.qos.ch bugzilla-daemon at pixie.qos.ch
Tue Dec 15 19:31:17 CET 2009


http://bugzilla.slf4j.org/show_bug.cgi?id=31





--- Comment #70 from Rick Beton <rick.beton at gmail.com>  2009-12-15 19:31:17 ---
As a user, what I want is a *simple* API based on Java 1.5. I'd also like my
existing code not to break. The crux of this lengthy three-year discussion is
that these are conflicting requirements in detail.

Therefore I generally support either

a. Joern Huxhorn's suggestion for a new slimmer API: throw away unwanted
methods, even throw away methods with explicit Throwables on the basis of the
principle of least surprise (I've seen FAR too many mistakes made with
incorrect logging of Throwables). The only downside of Joern's idea is that the
Eclipse organize-imports operation faces a new ambiguity because of the new
packages containing Logger and LoggerFactory as well as the old packages. And
there's more to document and maintain.

b. Bump up to v2.0 and provide source-level backward compatibility only. By
adding methods with varargs whilst keeping old methods, there might be
compilation failures caused by method ambiguities. So don't do that. Instead,
slim down the API to avoid ambiguities, even though this will provide only
source-level backward-compatibility, rather than binary-level. That gets my
vote.

SLF4J gets better!

Either way, drop the methods with Throwable arguments when varargs will do
instead.

Rick


-- 
Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the slf4j-dev mailing list