MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / createJsonlWriter

Function createJsonlWriter

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

Source from the content-addressed store, hash-verified

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

Callers 1

getLogWriterFunction · 0.85

Calls 1

createBufferedWriterFunction · 0.85

Tested by

no test coverage detected