(path: string, content: string)
| 112 | } |
| 113 | |
| 114 | function applyDebugLogBudgetSync(path: string, content: string): string | null { |
| 115 | const state = getDebugLogBudgetState(path) |
| 116 | let existingBytes = state.bytes |
| 117 | if (!state.initialized) { |
| 118 | try { |
| 119 | existingBytes = getFsImplementation().statSync(path).size |
| 120 | } catch { |
| 121 | existingBytes = 0 |
| 122 | } |
| 123 | } |
| 124 | return applyDebugLogBudget(path, content, existingBytes) |
| 125 | } |
| 126 | |
| 127 | export function resetDebugLoggingForTesting(): void { |
| 128 | debugWriter?.dispose() |
no test coverage detected