MCPcopy
hub / github.com/anomalyco/opencode / write

Function write

packages/core/test/effect/observability.test.ts:63–70  ·  view source on GitHub ↗
(runID: string)

Source from the content-addressed store, hash-verified

61 }
62 const file = path.join(dir, "opencode.log")
63 const write = (runID: string) =>
64 Effect.forEach(
65 Array.from({ length: 50 }, (_, index) => index),
66 (index) => Effect.logInfo(`entry-${index}`),
67 ).pipe(
68 Effect.provide(Logger.layer([fileLogger(file, runID)]).pipe(Layer.provide(NodeFileSystem.layer), Layer.orDie)),
69 Effect.scoped,
70 )
71
72 await Effect.runPromise(Effect.all([write("run-a"), write("run-b")], { concurrency: "unbounded" }))
73

Callers 1

Calls 3

fileLoggerFunction · 0.90
fromMethod · 0.45
layerMethod · 0.45

Tested by

no test coverage detected