* Wrap the debug statement so that it always print out the context name * as the prefix * @param args - Arguments for the debug
(...args: unknown[])
| 182 | * @param args - Arguments for the debug |
| 183 | */ |
| 184 | protected debug(...args: unknown[]) { |
| 185 | /* istanbul ignore if */ |
| 186 | if (!this._debug.enabled) return; |
| 187 | const formatter = args.shift(); |
| 188 | if (typeof formatter === 'string') { |
| 189 | this._debug(`[%s] ${formatter}`, this.name, ...args); |
| 190 | } else { |
| 191 | this._debug('[%s] ', this.name, formatter, ...args); |
| 192 | } |
| 193 | } |
| 194 | |
| 195 | /** |
| 196 | * A strongly-typed method to emit context events |
no test coverage detected