MCPcopy Index your code
hub / github.com/FIND-Lab/AgentWard / initFileLog

Function initFileLog

util/logger.ts:26–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24}
25
26export function initFileLog() {
27 if (logFilePath) return;
28 const stateDir = process.env.OPENCLAW_STATE_DIR?.trim()
29 ?? join(homedir(), ".openclaw");
30 const logDir = join(stateDir, "agentward", "logs");
31 mkdirSync(logDir, { recursive: true });
32 const timestamp = new Date().toISOString().replace(/[:.]/g, "-");
33 logFilePath = join(logDir, `${timestamp}.log`);
34}
35
36export function initLogger(api: OpenClawPluginApi) {
37 globalLogger = {

Callers 1

registerFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected