()
| 47 | } |
| 48 | |
| 49 | function scheduleFlush(): void { |
| 50 | if (!flushTimer) { |
| 51 | flushTimer = setTimeout(flush, flushIntervalMs) |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | // Detach the buffer synchronously so the caller never waits on writeFn. |
| 56 | // writeFn may block (e.g. errorLogSink.ts appendFileSync) — if overflow fires |