Logger for Asamm libraries and tools.
Add support for JitPack to project build.gradle.kts
allprojects {
repositories {
...
maven(url = "https://jitpack.io")
}
}
Add dependency to your build.gradle.kts
module config
dependencies {
// get Logger
implementation("com.github.asamm:logger-asamm:[latest]")
}
- Initialization
As soon as possible, register your own application into logger system with own ILogger
interface implementation over
Logger.registerLogger(myLoggerImpl)
- Usage
Use extension functions logV
, logD
, logI
, logW
and logE
.
- Categories (optional)
Define and use own LogCategory
objects. They may be supplied with the call as
logD(LogCategory.INITIALIZE) {
"My log message with tag-prefix and visible only when certain requirements are met."
}
LogCategory
, among defined tagPrefix
visibel with all tags, allows to define minPriority` value that specify, since which log priority logs will be visible. Value may be modified in the runtime, so it is easy to enable/disable bunch of logs. Because category is tested before the log is created, log messages has zero impact on performance when the category is disabled!