-
Notifications
You must be signed in to change notification settings - Fork 124
Open
Description
I'm using NodeJS 20 and this Winston MongoDB config:
const logger: CustomLevels = winston.createLogger({
...winstonLoggerOptions,
transports: [
new MongoDB({
level: "info",
db: dbURL,
options: {
serverSelectionTimeoutMS: 2147483647, // Never stop trying to reconnect
useNewUrlParser: true,
useUnifiedTopology: true,
},
collection: "logs",
storeHost: true,
capped: false, // Alternative to expireAfterSeconds
tryReconnect: true,
decolorize: true,
expireAfterSeconds: 60 * 60 * 24 * 120, // 120 days
}),
new winston.transports.Console({
level: "debug",
}),
],
});
I get this warning when running:
(node:40350) [DEP0170] DeprecationWarning: The URL mongodb://project-staging:[email protected]:27017,sp-cluster0-shard-00-00.t3lku.gcp.mongodb.net:27017,sp-cluster0-shard-00-01.t3lku.gcp.mongodb.net:27017/project-staging?authSource=admin&replicaSet=sp-cluster0-shard-0&ssl=true is invalid. Future versions of Node.js will throw an error.
Earlier versions of NodeJS (<19) don't throw any warnings.
Metadata
Metadata
Assignees
Labels
No labels