From 8b358edee76bdc5619b14c662411fecaca705e50 Mon Sep 17 00:00:00 2001 From: qwuerty Date: Fri, 11 Nov 2022 00:00:07 +0000 Subject: [PATCH 1/2] ignoreLogged does not log fix --- core/shared/src/main/scala/zio/ZIO.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/shared/src/main/scala/zio/ZIO.scala b/core/shared/src/main/scala/zio/ZIO.scala index 390f79d94136..9a7610c0c717 100644 --- a/core/shared/src/main/scala/zio/ZIO.scala +++ b/core/shared/src/main/scala/zio/ZIO.scala @@ -844,7 +844,7 @@ sealed trait ZIO[-R, +E, +A] * turns out to be important. */ final def ignoreLogged(implicit trace: Trace): URIO[R, Unit] = - self.foldCause( + self.foldCauseZIO( cause => ZIO.logLevel(LogLevel.Debug) { ZIO.logCause("An error was silently ignored because it is not anticipated to be useful", cause) From be81b8d05ad801b8a81f1ceb01a3f3a05df66151 Mon Sep 17 00:00:00 2001 From: qwuerty Date: Fri, 11 Nov 2022 12:43:34 +0000 Subject: [PATCH 2/2] Update ZIO.scala --- core/shared/src/main/scala/zio/ZIO.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/shared/src/main/scala/zio/ZIO.scala b/core/shared/src/main/scala/zio/ZIO.scala index 9a7610c0c717..475408d7301d 100644 --- a/core/shared/src/main/scala/zio/ZIO.scala +++ b/core/shared/src/main/scala/zio/ZIO.scala @@ -849,7 +849,7 @@ sealed trait ZIO[-R, +E, +A] ZIO.logLevel(LogLevel.Debug) { ZIO.logCause("An error was silently ignored because it is not anticipated to be useful", cause) }, - ZIO.unitFn + _ => ZIO.unit ) /**