We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f92b02b commit 6dacb62Copy full SHA for 6dacb62
packages/cli-repl/src/cli-repl.ts
@@ -267,11 +267,14 @@ export class CliRepl implements MongoshIOProvider {
267
});
268
269
// Do not wait for log cleanup and log errors if MongoLogManager throws any.
270
- void this.logManager.cleanupOldLogFiles().catch((err) => {
271
- this.bus.emit('mongosh:error', err, 'log');
272
- });
273
-
274
- markTime(TimingCategories.Logging, 'cleaned up log files');
+ void this.logManager
+ .cleanupOldLogFiles()
+ .catch((err) => {
+ this.bus.emit('mongosh:error', err, 'log');
+ })
275
+ .finally(() => {
276
+ markTime(TimingCategories.Logging, 'cleaned up log files');
277
+ });
278
279
if (!this.logWriter) {
280
this.logWriter ??= await this.logManager.createLogWriter();
0 commit comments