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

Function withConsoleLog

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

Source from the content-addressed store, hash-verified

263 * @since 2.0.0
264 */
265export const withConsoleLog = <Message, Output>(
266 self: Logger<Message, Output>
267): Logger<Message, void> =>
268 effect.loggerMake((options) => {
269 const console = options.fiber.getRef(effect.ConsoleRef)
270 return console.log(self.log(options))
271 })
272/**
273 * Returns a new `Logger` that writes all output of the specified `Logger` to
274 * the console using `console.error`.

Callers 1

Logger.tsFile · 0.85

Calls 2

getRefMethod · 0.80
logMethod · 0.65

Tested by

no test coverage detected