Description
In the current implementation:
class LogEntry(messageWithContext: => MessageWithContext) { def message: String = messageWithContext.message def context: java.util.HashMap[String, String] = messageWithContext.context } def logInfo(entry: LogEntry): Unit = { if (log.isInfoEnabled) { withLogContext(entry.context) { log.info(entry.message) } } }
The field `messageWithContext` is constructed twice, one from `entry.context` and another one from `entry.message`.
We should improve this.