Skip to content

Kotlin Multiplatform library for logging in Android, Apple, Linux, Windows, WASM, Javascript, and JVM.

License

Notifications You must be signed in to change notification settings

LexiLabs-App/basic-logging

Repository files navigation

Basic-Logging

basic

GitHub License GitHub Release Date Latest Release Kotlin

A Kotlin Multiplatform library to rapidly add logging to any project.

badge-android badge-ios badge-mac badge-watchos badge-tvos badge-nodejs badge-javascript badge-wasm badge-jvm badge-linux badge-windows

How it works

Basic-Logging uses platform-specific logging libraries to create console logs. These libraries include Java's Log, Apple's NSLog, and direct console writing for Javascript, WASM, MinGW, Linux, and JVM.

Installation

Add your dependencies from Maven

# in your 'libs.versions.toml' file
[versions]
lexilabs-basic = "+" #gets the latest version

[libraries]
lexilabs-basic-logging = { module = "app.lexilabs.basic:basic-logging", version.ref = "lexilabs-basic"}

then include the library in your gradle build

// in your 'shared/build.gradle.kts' file
sourceSets {
    commonMain.dependencies {
        implementation(libs.lexilabs.basic.logging)
    }
}

Usage

import app.lexilabs.basic.logging.Log

val tag = "CurrentModule"
Log.v(tag, "This is a verbose message")
Log.i(tag, "This is an info message")
Log.d(tag, "This is a debug message")
Log.w(tag, "This is a warning message")
Log.e(tag, "This is an error message") 
Log.wtf(tag, "Catastrophe message")

About

Kotlin Multiplatform library for logging in Android, Apple, Linux, Windows, WASM, Javascript, and JVM.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Contributors 2

  •  
  •