Skip to content
This repository has been archived by the owner on Jul 18, 2021. It is now read-only.

Commit

Permalink
Fix maxFiles default
Browse files Browse the repository at this point in the history
  • Loading branch information
felixbrucker committed Aug 1, 2020
1 parent a3482be commit 2428389
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/services/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,16 @@ class Logger {
return;
}

this.logWriter = rfs.createStream(Logger.logFileGenerator, {
const loggerOptions = {
size: '10M',
interval: '1d',
path: store.logging.dir,
maxFiles: store.logging.maxFiles,
});
};
if (store.logging.maxFiles) {
loggerOptions.maxFiles = store.logging.maxFiles;
}

this.logWriter = rfs.createStream(Logger.logFileGenerator, loggerOptions);
}

static logFileGenerator(time, index) {
Expand Down

0 comments on commit 2428389

Please sign in to comment.