Closed pixelpax closed 3 months ago
Can you give a bit more context on what you're trying to do, please? Is this something you can add to your log method invocations instead, rather than implicitly mixed in?
I'm closing this as stale, but feel free to reopen it with more context.
Been smashing my head against this for a minute, but I don't understand how preloaded modules work well enough.
I'm trying to add in user-specific data to pino.
Something like:
Except it seems that
global
is not actually shared between files executed in the next server runtime (e.g.middleware.ts
) and the global found innext-logger.config.js
If it was, I could use AsyncLocalStorage, but as it is I don't actually see any way of sharing memory between them. Help!