Open ben4d85 opened 4 years ago
Ran into the same issue. Thank-you @ben4d85 for the solution! At the very least instructions to fix this should be documented somewhere, but agreed that it should be set to a default option.
The useUnifiedTopology
set will impact on the default autoReconnect
option. Please find the doc here.
After adding useUnifiedTopology
, my question comes: will removing autoReconnect
impact logging in any way?
After enabling the useUnifiedTopology
option, I observed a strange behavior. All my unit tests went wrong.
This was because I sent 8 log messages in my unit test, but after executing a logger.end()
only one was written to the database.
As soon as I deactivate the option useUnifiedTopology
again, everything runs as desired again.
Can someone help me there? I cannot explain this to myself.
When using winston-mongodb, I receive the following message in the console:
The following code solves the issue. However, I was wondering if you would consider adding
useUnifiedTopology: true
to the default options?