[slf4j-dev] [Bug 240] Log4jLoggerAdapter.log(...) ignores argument array

bugzilla-daemon at pixie.qos.ch bugzilla-daemon at pixie.qos.ch
Wed Sep 14 20:32:34 CEST 2011


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

--- Comment #3 from John Vasileff <git at netcc.us> 2011-09-14 20:32:34 CEST ---
(In reply to comment #2)
> Uhm... lots of code duplication in the link you posted, and what would be the
> arguments parameter for if the message is already formatted ?

I'm not an authority on this, but I believe "Object[] argArray" should hold the
original arguments (minus the bug 70 trailing Throwable) if they are available,
or null.  I don't think Log4jLoggerAdapter has a use for the argArray since
formatting is performed by the caller, but other classes that implement
LocationAwareLogger may use them for filtering, serialization, etc.

In bug 241 I proposed a patch that removes some of the duplication in
LoggerWrapper:

https://github.com/jvasileff/slf4j/blob/210e4fa2c2efc32c2e9f1397b5448c39f6bf34f2/slf4j-ext/src/main/java/org/slf4j/ext/LoggerWrapper.java

FWIW, I recently proposed an updated 2.0 API that would provide further
simplifications.  A possible new Log4jLoggerAdapter:

https://github.com/jvasileff/slf4j/blob/98458fe317c9446e2d1024f7089daf22eb3feae4/slf4j-log4j12/src/main/java/org/slf4j/impl/Log4jLoggerAdapter.java

John

-- 
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