Converts a function that takes a PrintWriter (and returns Unit) into a message containing everything written to the PrintWriter during the function's execution.
Converts a function that takes a PrintWriter (and returns Unit) into a message containing everything written to the PrintWriter during the function's execution. This can be useful when you want to write several lines of text to the log and ensure that they remain together (not broken up by another entry or a file boundary).
So, instead of this:
val lines = Iterable[String] lines.foreach(log.debug)
do this:
val lines = Iterable[String] log.debug { pw:PrintWriter => lines.foreach(pw.println) }
Converts a String and a Throwable to a Message containing first the String and then the stack trace of the Throwable, separated by a new line.
Converts a String and a Throwable to a Message containing first the String and then the stack trace of the Throwable, separated by a new line. This conversion makes any function call that requires a single Message argument to appear to support two arguments.
Converts a String into a Message containing only the string.
Converts a Throwable to a Message containing its stack trace.
Contains some useful implicit conversions to Message. These are all that make using the timber API bearable. They should be in scope by virtue of being members of the companion object of the target class.