Open
Description
In the provided example, await
is used to write logs in nextjs api routes and it blocks the execution of rest of code. Situation gets worse if there are multiple logs inside a function. Overall reducing the performance of api. Is there a way to asynchronously write logs so that the method stays performant.
await logger.info(
'Handling a request to /api/hello',
{ user } // you can log structured data
);
Metadata
Metadata
Assignees
Labels
No labels