Hi Vincent, Vincent Massol wrote:
Hi Jonas,
On Sep 14, 2008, at 1:27 AM, Jonas von Malottki wrote:
Hi,
Vincent Massol wrote:
On Sep 13, 2008, at 11:30 PM, Jonas von Malottki wrote:
Oh, Hibernate now uses slf4j, which I once suggested for use in XWiki (Again it is *not* an implementation, it's just a facade, with plug- able implementations.) But we don't need it... We have our own simple facade which can be plugged to any logging system including slf4j. See http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-component/src/m... Ah, seeing this remembered me, that I wanted to introduce one of the slf4j features: delayed expanding of messages for logging see: http://n2.nabble.com/Logging-architecture-proposal-tt516791.html#none
Ah I had forgotten this email of yours, sorry about that. I've read it again and it seems good to me, especially since our best practice is now to use this:
logger.debug(String.format("text with %s in format syntax", var1, var2,...);
If you already use this then the message could also be left in the String.format format? Would make the message formatting another tick simpler.
So I'm +1 for modifying our logger interface to support this style. Actually I even think we should maybe deprecate the old signatures.
I have done a small patch with this now (attachment). Or should I create a Jira issue?
Can you create a jira issue and attach your patch there?
Done: http://jira.xwiki.org/jira/browse/XWIKI-2667
Thanks a lot Jonas for pursuing this! -Vincent
An SLF4J Logger implementation is also very easy then. And I can use it ;).
Greetings Jonas