summaryrefslogtreecommitdiff
path: root/src/logger.nim
diff options
context:
space:
mode:
authorkitty piapiac <kcp@bsd.computer>2020-07-29 05:24:02 -0700
committerkitty piapiac <kcp@bsd.computer>2020-07-29 05:24:02 -0700
commite0e6b6e04d8fcb6014028c70a52ff08ce8206d2f (patch)
tree609a22a8e6b201fbe2d2d9cbec7ddc53f04ecc00 /src/logger.nim
parented17aeb7079b329ec3c7e66792484660bcf6b3ef (diff)
(・ω・)b key handlers
Diffstat (limited to 'src/logger.nim')
-rw-r--r--src/logger.nim9
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