You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.
So I have a logger set up inside an express middleware, logging various things about the request.
One bit of information I'd like to add to the logs is - did the request hit a cold cache or not?
I have access to this information inside of my application code - inside of getComponent. However there's no great way that I can currently think of to thread this information along to other parts of the express app.
I'm thinking one way to do this would be to expose the express request object to the context object passed into getComponent
(Shoving arbitrary things on the request object is clearly not ideal. I still need to do some more thinking here, but that's probably an orthogonal problem)
Hi @goatslacker!
So I have a logger set up inside an express middleware, logging various things about the request.
One bit of information I'd like to add to the logs is - did the request hit a cold cache or not?
I have access to this information inside of my application code - inside of
getComponent
. However there's no great way that I can currently think of to thread this information along to other parts of the express app.I'm thinking one way to do this would be to expose the express
request
object to the context object passed intogetComponent
hypernova/src/utils/BatchManager.js
Line 90 in 477257d
Or maybe there's just a better way to architect this?
Thanks!
The text was updated successfully, but these errors were encountered: