[logback-dev] Parameterized logging

Pavel Bortnovskiy PBortnovskiy at Jefferies.com
Wed Mar 24 16:44:41 CET 2010


Thank you, Joern. When, are you planning to release SLF4J 2.0?






Joern Huxhorn <jhuxhorn at googlemail.com> 
Sent by: logback-dev-bounces at qos.ch
03/24/2010 11:33 AM
Please respond to
logback developers list <logback-dev at qos.ch>


To
logback developers list <logback-dev at qos.ch>
cc

Subject
Re: [logback-dev] Parameterized logging







On 24.03.2010, at 16:18, Pavel Bortnovskiy wrote:


Hello: 

I am a new subscriber to this list, so please forgive me if these 
questions have already been asked and answered. 

Being quite experienced with log4j, migrating to Logback would probably be 
a relatively easy exercise. However, while reading the manual, I have a 
few questions, which might be best addressed to the developers, rather 
than the users. 

1) using parameterized logging instead of wrapping the log statment in a 
conditional isEnabled, is very convenient, however I wonder whether there 
is an implementation of printf 
function (or whether there are plans to do so). 
http://java.sun.com/j2se/1.5.0/docs/api/java/util/Formatter.html#format(java.lang.String, 
java.lang.Object...) 
Implementation of log statements with such functionality and a variable 
arg list would be fairly trivial, but I found no references to such in 
Logback Javadocs, FAQ or search engine queries. 

2) If the answer to (1) is NO, then is there an easy way to extend Logback 
to incorporate such functions? 

Hi Pavel,

the answer is no, but varargs as well as extension of the parameterization 
mechanism is currently discussed in the following thread on the SLF4J-Dev 
list:
http://thread.gmane.org/gmane.comp.java.slf4j.devel/2805

Cheers,
Joern.
_______________________________________________
logback-dev mailing list
logback-dev at qos.ch
http://qos.ch/mailman/listinfo/logback-dev






Jefferies archives and monitors outgoing and incoming e-mail. The contents of this email, including any attachments, are confidential to the ordinary user of the email address to which it was addressed. If you are not the addressee of this email you may not copy, forward, disclose or otherwise use it or any part of it in any form whatsoever. This email may be produced at the request of regulators or in connection with civil litigation. Jefferies accepts no liability for any errors or omissions arising as a result of transmission. Use by other than intended recipients is prohibited.  In the United Kingdom, Jefferies operates as Jefferies International Limited; registered in England: no. 1978621; registered office: Vintners Place, 68 Upper Thames Street, London EC4V 3BJ.  Jefferies International Limited is authorised and regulated by the Financial Services Authority.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://qos.ch/pipermail/logback-dev/attachments/20100324/61760f0d/attachment.html>


More information about the logback-dev mailing list