mirror of
https://github.com/waku-org/nwaku.git
synced 2025-01-15 17:35:45 +00:00
20 lines
297 B
Nim
20 lines
297 B
Nim
|
import chronicles
|
||
|
|
||
|
logScope:
|
||
|
topics = "main"
|
||
|
|
||
|
type
|
||
|
Seconds = distinct int
|
||
|
|
||
|
proc `$`*(t: Seconds): string = $(t.int) & "s"
|
||
|
proc `%`*(t: Seconds): string = $(t.int)
|
||
|
|
||
|
proc main =
|
||
|
dynamicLogScope(reqId = 10, userId = 20):
|
||
|
info "test"
|
||
|
|
||
|
warn("about to exit", timeSpent = 2.Seconds)
|
||
|
|
||
|
main()
|
||
|
|