dependencies {
compile "com.zp4rker:log4kt:VERSION"
}
<dependency>
<groupId>com.zp4rker</groupId>
<artifactId>log4kt</artifactId>
<version>VERSION</version>
</dependency>
A very simple logging event listener. Usage is as below:
Log4KtEventListener.on<Log4KtLogEvent> {
if (it.t == null) return@on
logger.debug("an exception was printed")
}
Log4KtLogEvent
- Fired after a log is printed/sent.
Log4KtPrepareLogEvent
- Fired before a log is printed/sent.
- Level and message can be modified in this event.
- Event is also cancellable.
By default, it will colourise the output using Jansi. To disable this feature, simply exclude Jansi as a dependency.
For example:
dependencies {
compile ("com.zp4rker:log4kt:1.1.1") {
exclude group: "org.fusesource.jansi", module: "jansi"
}
}