You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Barry Kaplan <gr...@memelet.com> on 2005/07/27 18:13:49 UTC

[nlog4j] Format string and arguments

As I transition one of my projects to SLF4J/NLog4J, I like the format/arguments capability. However, rather than allow for one or two argument values, now about having an overload that accepts an array of arguments. This way a java5 layer can be added that supports varargs. 

In any case, I often require more than two arguments in log messages, which makes the format capability unusable in those cases. An array of args would resolve that.

-- 
barry kaplan

groups1@memelet.com


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: [nlog4j] Format string and arguments

Posted by Curt Arnold <ca...@houston.rr.com>.
On Jul 27, 2005, at 11:13 AM, Barry Kaplan wrote:

> As I transition one of my projects to SLF4J/NLog4J, I like the  
> format/arguments capability. However, rather than allow for one or  
> two argument values, now about having an overload that accepts an  
> array of arguments. This way a java5 layer can be added that  
> supports varargs.
> In any case, I often require more than two arguments in log  
> messages, which makes the format capability unusable in those  
> cases. An array of args would resolve that.


Are you sure that you meant to post this to log4j-user?  Seems more  
appropriate for slf4j-user (http://www.slf4j.org/mailing-lists.html).

org.slf4j.ULogger.debug(String format, Object arg1) could take an  
array as its second argument.  Currently I think it would just have  
toString called on which could flatten it out to a string.  The  
format specification could be expanded so you could address  
individual elements in the array, but I do not believe there has been  
any work on that.  Again you are likely to get better advice on slf4j  
at slf4j-user.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org