Method
logMessage
(category: 'error' | 'warn' | undefined, message: string, ...data: Arguments)
Source from the content-addressed store, hash-verified
| 184 | // |
| 185 | } |
| 186 | logMessage(category: 'error' | 'warn' | undefined, message: string, ...data: Arguments) { |
| 187 | if (!this.captureLogs) { |
| 188 | return; |
| 189 | } |
| 190 | const output = ([message] as any[]) |
| 191 | .concat(data) |
| 192 | .map((arg) => { |
| 193 | try { |
| 194 | return format(arg); |
| 195 | } catch { |
| 196 | return `${arg}`; |
| 197 | } |
| 198 | }) |
| 199 | .join(' '); |
| 200 | this._outputs.push({ category, output, time: Date.now() }); |
| 201 | } |
| 202 | } |
| 203 | |
| 204 | const consoleHijacker = new ConsoleHijacker(); |
Tested by
no test coverage detected