MCPcopy
hub / github.com/claude-code-best/claude-code / createJsonlWriter

Function createJsonlWriter

src/utils/errorLogSink.ts:47–60  ·  view source on GitHub ↗
(options: {
  writeFn: (content: string) => void
  flushIntervalMs?: number
  maxBufferSize?: number
})

Source from the content-addressed store, hash-verified

45}
46
47function createJsonlWriter(options: {
48 writeFn: (content: string) => void
49 flushIntervalMs?: number
50 maxBufferSize?: number
51}): JsonlWriter {
52 const writer = createBufferedWriter(options)
53 return {
54 write(obj: object): void {
55 writer.write(jsonStringify(obj) + '\n')
56 },
57 flush: writer.flush,
58 dispose: writer.dispose,
59 }
60}
61
62// Buffered writers for JSONL log files, keyed by path
63const logWriters = new Map<string, JsonlWriter>()

Callers 1

getLogWriterFunction · 0.85

Calls 1

createBufferedWriterFunction · 0.85

Tested by

no test coverage detected