Allow inclusion of Exceptions in warn convenience templates.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Package
|
||||
|
||||
version = "2.1.0"
|
||||
version = "2.1.1"
|
||||
author = "Jonathan Bernard"
|
||||
description = "Wrapper around std/logging to provide namespaced logging."
|
||||
license = "MIT"
|
||||
|
@@ -548,6 +548,9 @@ template notice*[L: Logger or Option[Logger], M](l: L, msg: M) =
|
||||
template warn*[L: Logger or Option[Logger], M](l: L, msg: M) =
|
||||
log(l, lvlWarn, msg)
|
||||
|
||||
template warn*[L: Logger or Option[Logger], M](l: L, err: ref Exception, msg: M) =
|
||||
log(l, lvlWarn, err, msg)
|
||||
|
||||
template error*[L: Logger or Option[Logger], M](l: L, msg: M) =
|
||||
log(l, lvlError, msg)
|
||||
|
||||
|
Reference in New Issue
Block a user