* Log a line to the web UI, a new line is automatically appended to the line
(line: string)
| 21 | * Log a line to the web UI, a new line is automatically appended to the line |
| 22 | */ |
| 23 | log(line: string): void { |
| 24 | const log = new Log(line, new Date()); |
| 25 | this.logs.push(log); |
| 26 | |
| 27 | for (const client of this.ws.getWss().clients) { |
| 28 | client.send( |
| 29 | JSON.stringify({ |
| 30 | tab: this.id, |
| 31 | payload: log, |
| 32 | }), |
| 33 | ); |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | private toJSON() { |
| 38 | return { |
no outgoing calls
no test coverage detected