import { NodeRuntime } from "@effect/platform-node"
import { Effect } from "effect"
import { DevToolsLive } from "./DevTools"
// Is it possible to annotate the logs from a value the inner effect returns?
const Foo = Effect.succeed("foo").pipe(
Effect.tap(() => Effect.logInfo("generated a foo")),
Effect.annotateLogs("fooValue", "???") // I want "foo"
)
Foo.pipe(
Effect.provide(DevToolsLive),
NodeRuntime.runMain
)
import { NodeRuntime } from "@effect/platform-node"
import { Effect } from "effect"
import { DevToolsLive } from "./DevTools"
// Is it possible to annotate the logs from a value the inner effect returns?
const Foo = Effect.succeed("foo").pipe(
Effect.tap(() => Effect.logInfo("generated a foo")),
Effect.annotateLogs("fooValue", "???") // I want "foo"
)
Foo.pipe(
Effect.provide(DevToolsLive),
NodeRuntime.runMain
)