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

Function format

packages/core/src/observability/logging.ts:44–47  ·  view source on GitHub ↗
(input: unknown)

Source from the content-addressed store, hash-verified

42}
43
44function format(input: unknown) {
45 const value = typeof input === "string" ? input : Formatter.format(input)
46 return /^[^\s="\\]+$/.test(value) ? value : JSON.stringify(value)
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.

Callers 1

formatterFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected