Allow inclusion of Exceptions in warn convenience templates.

This commit is contained in:
2025-07-18 10:25:25 -05:00
parent f0f0084cfd
commit 7e1671b26e
2 changed files with 4 additions and 1 deletions

View File

@@ -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"

View File

@@ -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)