News for hackers. Stuff that matters.
Re:A new log4j 2.0 by sk5t on Thursday December 06, 2012 @12:08PM (#4882553)
Meh. The payoff in format-string conditional log statements is in avoiding the cost of string construction only to throw it away--NOT to avoid the cost of evaluating operands.

I have always preferred the NLog style, where the default .Debug, .Warn, etc., functions use good old .NET format strings and a params argument. logger.Debug("Thing {0} happened at {1:R}", thing, thing.CompletionDate);

Re:A new log4j 2.0 by flyinRyan on Friday December 07, 2012 @09:18AM (#4886955)
No, the issue was:

log.Debug("Thing {0} happened", o.expensive_call())

could end up calling some method that took a very long time to run, only to be thrown away in the end. String construction isn't that big of a deal and their new API could avoiding doing it if the message won't be used.