Skip to content

ehsansouri23/Logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logger library

Usage

 counterLog {
    log withName "request_count" withValue 2.0 withTag {
        "is_api" to "true"
    } withTag {
        "has_user" to "false"
    }
}

// time logging
timerLog {
    log withName "function_call" withTag {
        "is_api" to "true"
    } withTag {
        "has_user" to "false"
    } withBlock {
        myFunctionToMeasureItsTime()
    }
}

// time logging with return value
val value = LoggerService.withTimeLogging(
    "function_call",
    mapOf("is_api" to "true", "has_user" to "false")
) {
    myFunctionToMeasureItsTimeWithReturnvalue()
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages