This is a really stupid question, but how can you conveniently format log lines in Play Framework 2 (and in Scala?).
I searched googled, but it is very difficult to find an example, in fact, most of the links talk about setting up Logback, in the first place, which I did well.
Basically I am trying to find a better stylistic way to do something like:
if(Logger.isDebugEnabled) Logger.debug("Modified: Id = '" + real_session_id + "', Modified = " + modified.toString)
Based on the background of C # (and log4net), I would suggest that you can do something like:
if(Logger.isDebugEnabled) Logger.debug("Modified: Id = '{0}', Modified = {1}", real_session_id, modified.toString)
But I donโt see how this will work with a sign as it is defined. I also saw vague references to how you could avoid checking Logger.isDebugEnabled using lazy evaluative syntax, for example:
Logger.debug("Modified: Id = ${real_session_id}, Modified = ${modified.toString}")
It uses Scala macros, but again, it does not work, and I can find very little information about it.
Did I miss something really egregious here?
Kieran benton
source share