log

Additional

Language
Kotlin
Version
N/A
Created
Sep 5, 2020
Updated
Feb 15, 2022
Owner
mallumo (mallumoSK)
Contributor
mallumo (mallumoSK)
1
Activity
Badge
Generate
Download
Source code

Blurb

log

Simple kotlin library for logging android and desktop projects

current version:

  • KOTLIN: 1.6.10 ->1.6.10-10.1.0

older version:

  • KOTLIN: 1.6.0, LOG: 10.0.0
  • KOTLIN: 1.5.10, LOG: 9.0.0
  • KOTLIN: 1.4.10, LOG: 8.3.0
repositories {
    maven {
        url = uri("https://mallumo.jfrog.io/artifactory/gradle-dev-local")
    }
}

dependencies {
    implementation "tk.mallumo:log:$version_log"
}

library dependency

    implementation "org.jetbrains.kotlin:kotlin-stdlib:1.5.10"
implementation 'com.google.code.gson:gson:2.8.7'

GLOBAL Enable / Disable by static variable:

tk.mallumo.log.LOGGER_IS_ENABLED

Enable / Disable by static variable:

if is library used in android project BUT in junit test, this prevent writing output to android logger output

tk.mallumo.log.LOGGER_CONSOLE_FORCE

Usage 1

tk.mallumo.log.logDEBUG("123")
// android-> in console will be output ([Name-Of-Class].kt:[Souce-Code-Line-Nuber]) [name-of-method]--> [input]
// desktop-> in console will be output (DEBUG: [Name-Of-Class].kt:[Souce-Code-Line-Nuber]) [name-of-method]--> [input]
//in console android: 
// (LoggerTest.kt:20) testFun--> 123
//in console desktop: 
//DEBUG: (LoggerTest.kt:20) testFun--> 123

Usage 2

data class Input(var itemx: String = "x")
tk.mallumo.log.logWARN(input = Input(), prettyPrin = false)
//in console: 
// (LoggerTest.kt:20) testFun--> {"itemx":"x"}