class KLogger
Class that wraps a Logger instance, and adds logging functions which receive lambdas as their argument. These functions are lazily evaluated.
KLogger(logger: Logger)
Main constructor |
val logger: Logger
Logger instance to wrap. |
fun debug(msg: String): Unit
Just like Logger.debug fun debug(msg: () -> Any): Unit
Executes given lambda and logs its result with Logger.debug. Allows lazy evaluation of logging message. |
|
fun error(msg: String): Unit
Just like Logger.error fun error(msg: () -> Any): Unit
Executes given lambda and logs its result with Logger.error. Allows lazy evaluation of logging message. |
|
fun info(msg: String): Unit
Just like Logger.info fun info(msg: () -> Any): Unit
Executes given lambda and logs its result with Logger.info. Allows lazy evaluation of logging message. |
|
fun trace(msg: String): Unit
Just like Logger.trace fun trace(msg: () -> Any): Unit
Executes given lambda and logs its result with Logger.trace. Allows lazy evaluation of logging message. |
|
fun warn(msg: String): Unit
Just like Logger.warn fun warn(msg: () -> Any): Unit
Executes given lambda and logs its result with Logger.warn. Allows lazy evaluation of logging message. |