Skip to content
This repository has been archived by the owner on Jun 14, 2022. It is now read-only.

mazuninky/kotlinx.logger-simple

Repository files navigation

Kotlinx.logger-simple

Minimal overhead logger with inline functions

How to use

Message logging

import kotlinx.logger.simple.*

debug { "Your message" }
d { "Your message" }
warning { "Your message" }
w { "Your message" }
info { "Your message" }
i { "Your message" }

Message logging with custom tag

import kotlinx.logger.simple.*

debug("Your tag") { "Your message" }
d("Your tag") { "Your message" }

Message logging with exception

import kotlinx.logger.simple.*

try {
  ...
} catch (exception: Exception) {
  debug(exception) { "Your message" }
  error(exception) { "Your message" }
}

Message logging with exception and tag

import kotlinx.logger.simple.*

try {
  ...
} catch (exception: Exception) {
  debug("Your tag", exception) { "Your message" }
  error("Your tag", exception) { "Your message" }
}

Supported platforms

  • Android
  • Js
  • JVM
  • Native

Planing platforms

  • Native/WASM

Who is using it