I think a small code sample could help here, because I'm not sure where logger 
comes from. You can just log like this (handler creation was moved into a 
gcsafe proc to prove that its gcsafe):
    
    
    import std/[asyncdispatch, os, sugar, logging]
    
    proc setupLogger() {.gcsafe.} =
      addHandler(newConsoleLogger(levelThreshold = lvlDebug))
    
    proc a() {.gcsafe.} =
      debug "Starting Callbacks"
    
    setupLogger()
    a()
    
    
    Run

No access to global state necessary. You'll need that per thread as each 
handler is per thread, but that all works.

Reply via email to