nwaku/vendor/nim-chronicles/tests/multiple_streams.nim

24 lines
310 B
Nim
Raw Normal View History

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