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
Prior to RC, there was a functionId arg passed into the createMiddleware({ type: "function" }).server({ functionId }). This was a log-safe and human readable identifier for the Server Function being called. Since the RC, this was replaced with a random ID.
I appreciate the random ID now, there's a bit less code introspection that can be done by the clients watching network tab, but this also means I can't get the original filename/function name anymore, which breaks my logging middlewares.
I used to have a
constlog=createMiddleware({type: "function"}).server(({ functionId, next })=>{conststart=Date.now()constresp=awaitnext()constend=Date.now()console.log(`${functionId} -- ${end-start}ms`)returnresp})
This used to print something like src_myFolder_myFile-myFunctionName -- 12ms, but now its basdf8sd0f98s-fd8s0vasd-89s0df-098sdf09a8sd0f -- 12ms
Can we get the original behavior restored somehow?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Prior to RC, there was a
functionIdarg passed into thecreateMiddleware({ type: "function" }).server({ functionId }). This was a log-safe and human readable identifier for the Server Function being called. Since the RC, this was replaced with a random ID.I appreciate the random ID now, there's a bit less code introspection that can be done by the clients watching network tab, but this also means I can't get the original filename/function name anymore, which breaks my logging middlewares.
I used to have a
This used to print something like
src_myFolder_myFile-myFunctionName -- 12ms, but now itsbasdf8sd0f98s-fd8s0vasd-89s0df-098sdf09a8sd0f -- 12msCan we get the original behavior restored somehow?
Beta Was this translation helpful? Give feedback.
All reactions