Hyperlinkv0.8.0-beta.28

Effect

Effect.logInfoconsteffect/Effect.ts:13899
(...message: ReadonlyArray<any>): Effect<void>

Logs one or more messages at the INFO level.

Example (Logging information)

import { Effect } from "effect"

const program = Effect.gen(function*() {
  yield* Effect.logInfo("Application starting up")
  yield* Effect.logInfo("Config loaded:", "production", "Port:", 3000)

  // Useful for general information
  const version = "1.2.3"
  yield* Effect.logInfo("Application version:", version)
})

Effect.runPromise(program)
// Output:
// timestamp=2023-... level=INFO message="Application starting up"
// timestamp=2023-... level=INFO message="Config loaded: production Port: 3000"
// timestamp=2023-... level=INFO message="Application version: 1.2.3"
logging
export const logInfo: (...message: ReadonlyArray<any>) => Effect<void> = internal.logWithLevel("Info")