Last active
December 20, 2021 09:17
-
-
Save MFlisar/b26f7e2fcb23470b33891f43275de6ae 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
// simple logs | |
L.d { "This is my first log entry" } | |
L.logIf { true }?.d { "This is my second log entry - it will be logged because logIf evaluates to true" } | |
L.logIf { false }?.d { "Slow log line without any impact at runtime - sleeping 5s: ${ Thread.sleep(5000) }"} | |
L.d { "Log line 3 will not slow down this code because the function inside the log will never be called because the logIf evaluates to false" } | |
// optionally tag a log line - tags are useful to group logs and can be disabled at runtime | |
L.tag("TAG1").d { "Log with tag" } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment