Add shutdown() to non-disk logger

The script `evict-inactive.js` calls `Log.shutdown()` at the end, which currently fails if logging to disk has been disabled via `logPath`.
This commit is contained in:
Alexander 2020-03-21 14:43:25 +01:00 committed by GitHub
parent 605aae222c
commit a190af079d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -96,7 +96,9 @@ Logger.create = function (config, cb) {
if (!config.logPath) {
console.log("No logPath configured. Logging to file disabled");
return void cb(Object.freeze(createMethods(ctx)));
var logger = createMethods(ctx);
logger.shutdown = noop;
return void cb(Object.freeze(logger));
}
Store.create({