logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raymond DeCampo <rdeca...@twcny.rr.com>
Subject Re: Varargs in JDK 1.5 will help loggers (a bit)
Date Sat, 05 Jul 2003 01:17:49 GMT
Nicola Ken Barozzi wrote:
> 
> With Java 1.5, AKA Tiger, Java will get varargs support, which means 
> that methods can have a variable number of parameters.
> 
> Imagine
> 
>   log("The error", a, c, exception, f[i])
> 
> Instead of
> 
>  log("The error "+ a + "\n"+ c + exception.toString + String.valueOf(f[i]))
> 
> @see http://www.madbean.com/blog/22/
> 
One could already accomplish the same thing with

log(new Object[] {"The error ", a, "\n", c, exception, f[i]});

So what was the rationale behind introducing the new syntax?

Ray



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


Mime
View raw message