From e0e6b6e04d8fcb6014028c70a52ff08ce8206d2f Mon Sep 17 00:00:00 2001 From: kitty piapiac Date: Wed, 29 Jul 2020 05:24:02 -0700 Subject: =?UTF-8?q?(=EF=BD=A5=CF=89=EF=BD=A5)b=20key=20handlers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/logger.nim | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/logger.nim') 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 -- cgit v1.2.3