Home
hexagon_core / com.hexagonkt.helpers / Logger
Logger¶
class Logger
Logger class with Kotlin improvements like lazy evaluation. It is backed by a SLF4J compatible logger.
Usage example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
|
Parameters¶
type
- Logger type. It is shown in the logs messages and used for log filtering.
Constructors¶
Name | Summary |
---|---|
<init> | Logger(instance: Any ) Logger class with Kotlin improvements like lazy evaluation. It is backed by a SLF4J compatible logger. Logger(type: KClass <*>) |
Functions¶
Name | Summary |
---|---|
debug | fun debug(message: () -> Any ?): Unit |
error | fun error(message: () -> Any ?): Unit fun <E : Throwable > error(exception: E, message: (E) -> Any ?): Unit |
flare | fun flare(message: () -> Any ? = { "" }): Unit |
info | fun info(message: () -> Any ?): Unit |
time | fun time(startNanos: Long , message: () -> Any ? = { "" }): Unit fun <T> time(message: () -> Any ? = { null }, block: () -> T): T fun <T> time(message: Any ?, block: () -> T): T |
trace | fun trace(message: () -> Any ?): Unit |
warn | fun warn(message: () -> Any ?): Unit fun <E : Throwable > warn(exception: E, message: (E) -> Any ?): Unit |