log

General

Category
Free
Tag
Logging
License
Apache License, Version 2.0
Registered
Sep 8, 2020
Favorites
1
Link
https://github.com/mallumoSK/log
See also
Curl-Logger-interceptor
Logger
TLog-master
Scribo
LogUtils

Additional

Language
Kotlin
Version
N/A
Created
Sep 6, 2020
Updated
Jun 29, 2021
Owner
mallumo (mallumoSK)
Contributor
mallumo (mallumoSK)
1
Activity
Badge
Generate
Download
Source code

Advertisement

log

Simple kotlin library for logging android and desktop projects

current version: KOTLIN: 1.5.10

older version: 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"}