MCPcopy
hub / github.com/Koenkk/zigbee2mqtt / log

Method log

lib/util/logger.ts:193–200  ·  view source on GitHub ↗
(level: settings.LogLevel, messageOrLambda: string | (() => string), namespace: string)

Source from the content-addressed store, hash-verified

191 }
192
193 private log(level: settings.LogLevel, messageOrLambda: string | (() => string), namespace: string): void {
194 const nsLevel = this.cacheNamespacedLevel(namespace);
195
196 if (settings.LOG_LEVELS.indexOf(level) <= settings.LOG_LEVELS.indexOf(nsLevel)) {
197 const message: string = messageOrLambda instanceof Function ? messageOrLambda() : messageOrLambda;
198 this.logger.log(level, `${namespace}: ${message}`);
199 }
200 }
201
202 public error(messageOrLambda: string | (() => string), namespace = "z2m"): void {
203 this.log("error", messageOrLambda, namespace);

Callers 14

errorMethod · 0.95
warningMethod · 0.95
infoMethod · 0.95
debugMethod · 0.95
index.jsFile · 0.45
triggerWatchdogFunction · 0.45
startFunction · 0.45
migrateIfNecessaryFunction · 0.45
startOnboardingServerFunction · 0.45
startMethod · 0.45
clearAllNvMemItemsMethod · 0.45

Calls 1

cacheNamespacedLevelMethod · 0.95

Tested by

no test coverage detected