diff --git a/packages/logger/src.ts/index.ts b/packages/logger/src.ts/index.ts index 4f764ebae..bba8ed70a 100644 --- a/packages/logger/src.ts/index.ts +++ b/packages/logger/src.ts/index.ts @@ -151,15 +151,6 @@ export class Logger { }); } - setLogLevel(logLevel: LogLevel): void { - const level = LogLevels[logLevel]; - if (level == null) { - this.warn("invalid log level - " + logLevel); - return; - } - LogLevel = level; - } - _log(logLevel: LogLevel, args: Array): void { if (LogLevel > LogLevels[logLevel]) { return; } console.log.apply(console, args); @@ -318,4 +309,13 @@ export class Logger { _censorErrors = !!censorship; _permanentCensorErrors = !!permanent; } + + static setLogLevel(logLevel: LogLevel): void { + const level = LogLevels[logLevel]; + if (level == null) { + Logger.globalLogger().warn("invalid log level - " + logLevel); + return; + } + LogLevel = level; + } }