()
| 90 | const daemonLog = openDaemonLog(); |
| 91 | |
| 92 | function openDaemonLog(): fs.WriteStream | null { |
| 93 | try { |
| 94 | const p = resolveDaemonLogPath(); |
| 95 | fs.mkdirSync(path.dirname(p), { recursive: true }); |
| 96 | return fs.createWriteStream(p, { flags: "a" }); |
| 97 | } catch { |
| 98 | return null; |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | function dlog(...args: unknown[]): void { |
| 103 | const line = `[${new Date().toISOString()}] ${args.map(String).join(" ")}\n`; |
no test coverage detected