MCPcopy
hub / github.com/garrytan/gstack / openDaemonLog

Function openDaemonLog

design/src/daemon.ts:92–100  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

90const daemonLog = openDaemonLog();
91
92function 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
102function dlog(...args: unknown[]): void {
103 const line = `[${new Date().toISOString()}] ${args.map(String).join(" ")}\n`;

Callers 1

daemon.tsFile · 0.85

Calls 1

resolveDaemonLogPathFunction · 0.90

Tested by

no test coverage detected