diff options
author | kitty piapiac <kcp@bsd.computer> | 2020-07-29 05:24:02 -0700 |
---|---|---|
committer | kitty piapiac <kcp@bsd.computer> | 2020-07-29 05:24:02 -0700 |
commit | e0e6b6e04d8fcb6014028c70a52ff08ce8206d2f (patch) | |
tree | 609a22a8e6b201fbe2d2d9cbec7ddc53f04ecc00 /src/logger.nim | |
parent | ed17aeb7079b329ec3c7e66792484660bcf6b3ef (diff) |
(・ω・)b key handlers
Diffstat (limited to 'src/logger.nim')
-rw-r--r-- | src/logger.nim | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/logger.nim b/src/logger.nim index 8e0c36f..bf878b0 100644 --- a/src/logger.nim +++ b/src/logger.nim @@ -1,3 +1,10 @@ import logging -var consoleLog* = newConsoleLogger(fmtStr="kauw/ $time/ $levelname: ")
\ No newline at end of file +const debug = false # set this to true to get debug messags + +var consoleLog* = newConsoleLogger(fmtStr="kauw/ $time/ $levelname: ") + +proc log* (lvl: Level, str: string) = + if lvl == lvlDebug: + if not debug: return + consoleLog.log(lvl, str)
\ No newline at end of file |