JavaScript file executed twice when using pino/file
transport with --import
option
#1049
Labels
pino/file
transport with --import
option
#1049
💬 Question
When using the
pino/file
transport with the--import
option to include a JavaScript file, the file is executed twice instead of just once. This behavior looks as unexpected and can lead to issues such as duplicated log entries or other side effects from the script running twice. Should I report an issue or is there a solution for this problem?To reproduce this issue, please, create fastify instance with following options:
Create another module with the following code:
Run application with command:
Actual output:
Expected output:
Please, see the repo to reproduce the problem.
Environment
Additional
As workaround it possible use
true
in logger options or don't use thetransport
option in logger options.The text was updated successfully, but these errors were encountered: