MCPcopy Create free account
hub / github.com/anomalyco/opencode / fileLogger

Function fileLogger

packages/core/src/observability/logging.ts:49–52  ·  view source on GitHub ↗
(file = path.join(Global.Path.log, "opencode.log"), id: string = runID)

Source from the content-addressed store, hash-verified

47}
48
49export function fileLogger(file = path.join(Global.Path.log, "opencode.log"), id: string = runID) {
50 // Do not set batchWindow to 0; it causes high idle CPU usage.
51 return Logger.toFile(formatter(id), file, { flag: "a" })
52}
53
54const stderrLogger = Logger.make((options) => process.stderr.write(formatter().log(options) + "\n"))
55

Callers 3

writeFunction · 0.90
loggersFunction · 0.85

Calls 1

formatterFunction · 0.85

Tested by 1

writeFunction · 0.72