Skip to content

Commit

Permalink
bind to the correct LogLevel
Browse files Browse the repository at this point in the history
in case a different `LogLevel` exists in the generic scope...
  • Loading branch information
arnetheduck committed Nov 29, 2023
1 parent b879544 commit 7d628f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chronicles.nim
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ when runtimeFilteringEnabled:
for topic in topics:
topicsArray.add newCall(topicStateIMPL, newLit(topic))

let lvl = newDotExpr(ident "LogLevel", ident $logLevel)
let lvl = newDotExpr(bindSym("LogLevel", brClosed), ident $logLevel)
result.add quote do:
if not `topicsMatch`(`lvl`, `topicsArray`):
break `chroniclesBlockName`
Expand Down Expand Up @@ -291,7 +291,7 @@ macro logIMPL(lineInfo: static InstInfo,
# `setProperty` and `flushRecord`.
let
record = genSym(nskVar, "record")
lvl = newDotExpr(ident "LogLevel", ident $severity)
lvl = newDotExpr(bindSym("LogLevel", brClosed), ident $severity)
expandItIMPL = bindSym("expandItIMPL", brForceOpen)

code.add quote do:
Expand Down

0 comments on commit 7d628f5

Please sign in to comment.