-
-
Notifications
You must be signed in to change notification settings - Fork 116
Multiplatform support
Ohad Shai edited this page Jul 14, 2020
·
15 revisions
kotlin-logging composed of 3 modules:
- Common - artifact id:
kotlin-logging-common
- JVM - artifact id:
kotlin-logging
- JS - artifact id:
kotlin-logging-js
In order to include in gradle build file add the following dependency:
compile 'io.github.microutils:<artifact id>:<version>'
A Note on Kotlin Native support:
Experimental support for linux x64
exists, but artifacts are not published yet.
To track the status see #45.
Obtaining a logger is supported only by a field (no inheritance at the moment):
private val logger = KotlinLogging.logger {}
KLogger
log messages support only lazy methods messages such as:
logger.info { "Hello World!" }
All common interfaces and methods are supported.
In addition, in order to define log level set field KotlinLoggingConfiguration.LOG_LEVEL
during startup.
For example:
KotlinLoggingConfiguration.LOG_LEVEL = KotlinLoggingLevel.DEBUG
- Default level is
INFO