Thorbjørn Ravn Andersen wrote:
> Ashish Kulkarni skrev den 04-08-2008 21:45:
>> Hi
>> Is there anyway to format the log messages using java 1.5 format
>> capabilities
>> for example i can have a nice formatted out put using
>> System.out.format("Number of Users on Registry %1$s, is %2$d",
>> registry.getName(), userSet.size());
>>
> Use slf4j as the logging interface and use log4j as the backend.
>
> You can then call
>
> log.debug("Name: {} Size {}", "Foo", new Integer(10));
>
>
No need for SLF4J. Use the Log4j "extras" companion [1] LogMF [2] or LogSF [3]
utility classes.
[1] http://logging.apache.org/log4j/companions/extras/download.html
[2]
http://logging.apache.org/log4j/companions/extras/apidocs/org/apache/log4j/LogMF.html
[3]
http://logging.apache.org/log4j/companions/extras/apidocs/org/apache/log4j/LogSF.html
Jake
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]