(logLevel, message, method, args, opts)
| 58272 | return this.isEnabled() && this.getLevel() >= normalizeLogLevel(logLevel); |
| 58273 | } |
| 58274 | _getLogFunction(logLevel, message, method, args, opts) { |
| 58275 | if (this._shouldLog(logLevel)) { |
| 58276 | opts = normalizeArguments({ |
| 58277 | logLevel, |
| 58278 | message, |
| 58279 | args, |
| 58280 | opts |
| 58281 | }); |
| 58282 | method = method || opts.method; |
| 58283 | (0, _assertDefault.default)(method); |
| 58284 | opts.total = this.getTotal(); |
| 58285 | opts.delta = this.getDelta(); |
| 58286 | this._deltaTs = (0, _hiResTimestamp.getHiResTimestamp)(); |
| 58287 | const tag = opts.tag || opts.message; |
| 58288 | if (opts.once) { |
| 58289 | if (!cache[tag]) cache[tag] = (0, _hiResTimestamp.getHiResTimestamp)(); |
| 58290 | else return noop; |
| 58291 | } |
| 58292 | message = decorateMessage(this.id, opts.message, opts); |
| 58293 | return method.bind(console, message, ...opts.args); |
| 58294 | } |
| 58295 | return noop; |
| 58296 | } |
| 58297 | } |
| 58298 | exports.default = Log; |
| 58299 | (0, _definePropertyDefault.default)(Log, "VERSION", (0, _env.VERSION)); |
no test coverage detected