cappedMax not working in winston-mongodb logger in Node.js on Ubuntu
问题 I have created a logger in Node.js using the winston module and added MongoDB transport by requiring winston-mongodb module with the following options: { db: config.db[k.DB_ENV.AUTHOR], username: config.dbUser, password: config.dbPassword, collection: 'log-aggregation', storeHost: true, capped: true, cappedMax: 10 // documents } I expect the logger to create a new collection for every 10 documents . But the logger continue logging in the same collection. I commented the collection: 'log