()
| 896 | const originalWarn = console.warn; |
| 897 | const originalError = console.error; |
| 898 | function ts() { return '[' + new Date().toISOString() + ']'; } |
| 899 | // Wrap originals in try/catch so a broken transport (closed pty, |
| 900 | // disk full on a redirected log file) cannot escape and trip |
| 901 | // unhandledException -> exit(1) the next time we log. |