Allow inclusion of Exceptions in warn convenience templates.

This commit is contained in:
jdb committed 2025-07-18 10:26:15 -05:00
1 parent f0f0084cfd
commit 5fc5684a48
2 files changed
+4 -1

No files matched your search

+1 -1
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"
+3
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)