MCPcopy Create free account
hub / github.com/ConsortiumAI/Consortium / logToFile

Method logToFile

packages/consortium-cli/src/ui/logger.ts:131–144  ·  view source on GitHub ↗
(prefix: string, message: string, ...args: unknown[])

Source from the content-addressed store, hash-verified

129 }
130
131 private logToFile(prefix: string, message: string, ...args: unknown[]): void {
132 const logLine = `${prefix} ${message} ${args.map(arg =>
133 typeof arg === 'string' ? arg : JSON.stringify(arg)
134 ).join(' ')}\n`
135
136 try {
137 appendFileSync(this.logFilePath, logLine)
138 } catch (appendError) {
139 if (process.env.DEBUG) {
140 console.error('[DEV MODE ONLY] Failed to append to log file:', appendError)
141 throw appendError
142 }
143 }
144 }
145}
146
147export const logger = new Logger()

Callers 2

debugMethod · 0.95
debugLargeJsonMethod · 0.95

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected