Minor fixes; Renamed StyledConsoleLogger into NiftyLogger.
h3rald h3rald@h3rald.com
Thu, 23 Feb 2017 21:28:40 +0100
4 files changed,
9 insertions(+),
9 deletions(-)
M
lib/config.nim
→
lib/config.nim
@@ -6,7 +6,7 @@ strutils,
logging import - styled_console_logger + niftylogger const cfgfile = "../nifty.nimble".slurp@@ -19,7 +19,7 @@ f = newStringStream(cfgfile)
if f != nil: var p: CfgParser - open(p, f, "../minim.nimble") + open(p, f, "../nifty.nimble") while true: var e = next(p) case e.kind
M
lib/styled_console_logger.nim
→
lib/niftylogger.nim
@@ -6,7 +6,7 @@
system.addQuitProc(resetAttributes) type - StyledConsoleLogger* = ref object of Logger + NiftyLogger* = ref object of Logger proc logPrefix*(level: Level): tuple[msg: string, color: ForegroundColor] = case level:@@ -25,7 +25,7 @@ return ("(x)", fgRed)
else: return (" ", fgWhite) -method log*(logger: StyledConsoleLogger; level: Level; args: varargs[string, `$`]) = +method log*(logger: NiftyLogger; level: Level; args: varargs[string, `$`]) = var f = stdout if level >= getLogFilter() and level >= logger.levelThreshold: if level >= lvlWarn:@@ -39,7 +39,7 @@ resetAttributes()
f.write("\n") if level in {lvlError, lvlFatal}: flushFile(f) -proc newStyledConsoleLogger*(levelThreshold = lvlAll; fmtStr = " "): StyledConsoleLogger = +proc newNiftyLogger*(levelThreshold = lvlAll; fmtStr = " "): NiftyLogger = new result result.fmtStr = fmtStr result.levelThreshold = levelThreshold
M
nifty.nimble
→
nifty.nimble
@@ -4,7 +4,7 @@ version = "0.1.0"
author = "Fabio Cevasco" description = "A pseudo package manager and script runner." license = "MIT" -bin = "minim" +bin = "nifty" [Deps] -requires: "nim >= 0.15.2" +requires: "nim >= 0.16.2"