MCPcopy Create free account
hub / github.com/FIND-Lab/AgentWard / writeToFile

Function writeToFile

util/logger.ts:16–24  ·  view source on GitHub ↗
(level: string, msg: string)

Source from the content-addressed store, hash-verified

14let logFilePath: string | null = null;
15
16function writeToFile(level: string, msg: string) {
17 if (!logFilePath) return;
18 const line = JSON.stringify({
19 timestamp: new Date().toISOString(),
20 level,
21 message: msg,
22 }) + "\n";
23 appendFileSync(logFilePath, line, "utf8");
24}
25
26export function initFileLog() {
27 if (logFilePath) return;

Callers 1

initLoggerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected