On Thu, Apr 10, 2014 at 5:46 PM, Michael Armbrust <mich...@databricks.com> wrote: > ... all of the suffer from the fact that the log message needs to be built >> even >> though it might not be used. > > This is not true of the current implementation (and this is actually why > Spark has a logging trait instead of just using a logger directly.) > > If you look at the original function signatures: > > protected def logDebug(msg: => String) ... > > > The => implies that we are passing the msg by name instead of by value. > Under the covers, scala is creating a closure that can be used to calculate > the log message, only if its actually required.
Hah. Interesting. Guess it's my noob Scala hat showing off. I saw the PR about using scala-logging before, but didn't pay too close attention to it. Thanks for the info guys! -- Marcelo