federico3: Wow, that is awesome! Love the key/value pair logging! The mention
of systemd makes me think this aspect at least is only available on Linux
though, right?
Spam: if you need more logging helpers:
[https://github.com/FedericoCeratto/nim-morelogging](https://github.com/FedericoCeratto/nim-morelogging)
coffeepot: I'm afraid it isn't possible to implement it using a variable (e.g.
something like $line). Yeah, it is possible to add this just as template, but I
don't really think it would be accepted in stdlib
Gotta say, that is pretty slick.
I love how easy it is in Nim to get info such as line numbers and stack traces,
checking if variables are defined or exist and stuff like that.
I'll definitely be using this. Maybe there's room for it in the logging.nim
module?
Nim allows getting a line number from a template (via compile-time
information). So you can make a log template to do that:
import logging, strutils
var logger = newConsoleLogger(fmtStr = "[$time][$levelid]")
addHandler(logger)
template log*(lvl: Level, data: s