MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / timestampStderrLines

Function timestampStderrLines

src/mcp/index.ts:114–119  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

112 * inherited fd 2, bypassing this wrapper — it stamps that line itself.)
113 */
114export function timestampStderrLines(): void {
115 const orig = process.stderr.write.bind(process.stderr);
116 process.stderr.write = ((chunk: string | Uint8Array, ...rest: unknown[]) => {
117 return (orig as (...args: unknown[]) => boolean)(stampLogChunk(chunk), ...rest);
118 }) as typeof process.stderr.write;
119}
120
121/** Prepend `[<ISO-8601>] ` to a log chunk; unknown chunk types pass through. */
122export function stampLogChunk(chunk: string | Uint8Array): string | Uint8Array {

Callers 1

startDaemonProcessMethod · 0.85

Calls 1

stampLogChunkFunction · 0.85

Tested by

no test coverage detected