MCPcopy Create free account
hub / github.com/Effect-TS/effect / withConsoleError

Function withConsoleError

packages/effect/src/Logger.ts:305–311  ·  view source on GitHub ↗
(
  self: Logger<Message, Output>
)

Source from the content-addressed store, hash-verified

303 * @since 2.0.0
304 */
305export const withConsoleError = <Message, Output>(
306 self: Logger<Message, Output>
307): Logger<Message, void> =>
308 effect.loggerMake((options) => {
309 const console = options.fiber.getRef(effect.ConsoleRef)
310 return console.error(self.log(options))
311 })
312/**
313 * Returns a new `Logger` that writes all output of the specified `Logger` to
314 * the console.

Callers

nothing calls this directly

Calls 3

getRefMethod · 0.80
errorMethod · 0.80
logMethod · 0.65

Tested by

no test coverage detected