mirror of
https://github.com/waku-org/nwaku.git
synced 2025-01-15 17:35:45 +00:00
24 lines
310 B
Nim
24 lines
310 B
Nim
import chronicles
|
|
|
|
logScope:
|
|
stream = "foo"
|
|
|
|
proc fooStreamer =
|
|
info "logging to foo"
|
|
|
|
logScope:
|
|
stream = "bar"
|
|
|
|
proc main =
|
|
dynamicLogScope(reqId = 10, userId = 20):
|
|
info "dynamic scope starts"
|
|
fooStreamer()
|
|
info "dynamic scope ends"
|
|
|
|
fooStreamer()
|
|
|
|
warn "about to exit main"
|
|
|
|
main()
|
|
|