diff --git a/src/logging/BaseLogger.ts b/src/logging/BaseLogger.ts index 6ff50b98..2f7389ab 100644 --- a/src/logging/BaseLogger.ts +++ b/src/logging/BaseLogger.ts @@ -61,11 +61,11 @@ export abstract class BaseLogger implements ILogger { Errors and duration are transparently logged, also for async operations. Whatever the callback returns is returned here. */ run(labelOrValues: LabelOrValues, callback: LogCallback, logLevel?: LogLevel, filterCreator?: FilterCreator): T { - if (!logLevel) { + if (logLevel === undefined) { logLevel = LogLevel.Info; } const item = new LogItem(labelOrValues, logLevel, this); - return this._run(item, callback, logLevel!, true, filterCreator); + return this._run(item, callback, logLevel, true, filterCreator); } _run(item: ILogItem, callback: LogCallback, logLevel: LogLevel, wantResult: true, filterCreator?: FilterCreator): T;