From 45975399ccbecbd4a3f59e00a176545bfa39affe Mon Sep 17 00:00:00 2001 From: Matthias Langer Date: Mon, 22 Jul 2019 16:48:52 +0200 Subject: [PATCH] Cosmetics --- src/main/scala/com/github/mlangc/slf4zio/api.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/com/github/mlangc/slf4zio/api.scala b/src/main/scala/com/github/mlangc/slf4zio/api.scala index 5b946ee..89a291f 100644 --- a/src/main/scala/com/github/mlangc/slf4zio/api.scala +++ b/src/main/scala/com/github/mlangc/slf4zio/api.scala @@ -75,7 +75,7 @@ object api { aOrE <- zio.either nanosAfter <- UIO(System.nanoTime()) elapsed = Duration.fromNanos(nanosAfter - nanosBefore) - _ <- if (elapsed >= threshold) logger.debugIO(msg(elapsed)) else UIO.unit + _ <- ZIO.when(elapsed >= threshold)(logger.debugIO(msg(elapsed))) } yield aOrE for {