Created
June 16, 2019 04:56
-
-
Save berteodosio/74d6fdc9116909badaaca7effe9cdfd5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun logInfo(info: String, myLogLevel: LogLevel) { | |
if (myLogLevel includes LogLevel.INFO) { | |
Log.i(TAG, info) | |
} | |
} | |
fun testLogLevel() { | |
val info = "cheeseburger" | |
logInfo(info, myLogLevel = LogLevel.ERROR) // nothing is logged | |
logInfo(info, myLogLevel = LogLevel.VERBOSE) // message is logged, because verbose includes info | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment