diff options
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 |