[slf4j-dev] Beta 4 and the new method signatures

Christian Stein sormuras at gmx.de
Thu Jul 7 07:54:58 CEST 2005


Hello Ceki, Niklas and all others!

I'm totally with Niklas - especially in two issues. First the strong typing of
the 'message' and 'format' argument as String. And second, his proposal of the
generic 'log(LEVEL, message...)' methods. Nice to see the first issue
implemented in the current version of SLF4J, already. Is the 'log(...)' feature
 a no-go, Ceki?

Another question. In the message http://svn.slf4j.org/viewcvs?rev=82&view=rev of
the SVN log, you write about 5 debug methods. Namely:

(cg1)  debug(String msg);
(cg2)  debug(String msg, Throwable t);
(cg3)  debug(String format, Object arg);
(cg4)  debug(String format, Object arg, Object arg2);
(cg5)  debug(String format, Object[] args);

In revision 95 of Logger.java I miss (cg5) - or is it covered by (cg3)?

Is (cg4) a "short cut" for (cg5)? Does it "virtually" expand to:
  debug(format, new Object[] {arg, arg2});

Hmm, I didn't read the documentation too carefully, but if the target platform
were Java5, you could merge (cg3..5) into one method. Something like:

(cs1)  debug(String format, Object... arguments);

But this feature might be only interesting in, say SLF5J... *hehe*

Anyway, I really like the "new cloth" of Log4J and hope that many projects will
carefully re-think about usage of JCL. Keep up the excellent work!

Cheers,
Christian



More information about the slf4j-dev mailing list