(level: settings.LogLevel, messageOrLambda: string | (() => string), namespace: string)
| 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); |
no test coverage detected