logOrElse method

RIO<R, A> logOrElse(
  1. A orElse(
    1. E _
    )
)

Succeed with the value of this ZIO if it succeeds, or succeed with the result of the given function if it fails.

On failure, the error is logged using logInfo.

Implementation

RIO<R, A> logOrElse(
  A Function(E _) orElse,
) =>
    tapError((_) => logInfo(_)).getOrElse(orElse);