-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
Hi @chasers, thanks for the product!
Setup
Next.js project with middleware deployed to Vercel with pino-logflare.
Problem
Attempt to use logger either directly or via new child inside middleware
logger.info({ name: 'abc' }, 'In middleware');
...
const currentLogger = logger.child({ source: 'middleware' });
currentLogger.info({ name: 'abc' }, 'In middleware');
lead to edge function crash with message
"message": "[EvalError: Code generation from strings disallowed for this context]",
"source": "edge",
"type": "fatal"
Using console.log does not parse message into parsedLambdaMessage or similar property inside middleware.
Questions
- Can I setup logger in a way it supports structured logging inside edge function?
- Do you plan to include property similar to 'parsedLambdaMessage' for Vercel's edge functions?
Metadata
Metadata
Assignees
Labels
No labels