From b99b0708d02576492a762b1302940dbdb70091ef Mon Sep 17 00:00:00 2001 From: Daniel Vigovszky Date: Sat, 22 May 2021 21:08:11 +0200 Subject: [PATCH] Update to ZIO 1.0.8 and Scala 3.0.0 (#275) --- .github/workflows/ci.yml | 2 +- build.sbt | 4 ++-- core/shared/src/main/scala/zio/logging/LogAppender.scala | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 700f11e4..46ac9f3d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,7 +48,7 @@ jobs: fail-fast: false matrix: java: ['adopt@1.8', 'adopt@1.11'] - scala: ['2.11.12', '2.12.13', '2.13.5', '3.0.0-RC3'] + scala: ['2.11.12', '2.12.13', '2.13.6', '3.0.0'] platform: ['JVM', 'JS'] steps: - name: Checkout current branch diff --git a/build.sbt b/build.sbt index b319c259..65152bba 100644 --- a/build.sbt +++ b/build.sbt @@ -20,8 +20,8 @@ inThisBuild( ) ) -val ZioVersion = "1.0.7" -val scalaJavaTimeVersion = "2.0.0-RC5" +val ZioVersion = "1.0.8" +val scalaJavaTimeVersion = "2.3.0" val slf4jVersion = "1.7.30" addCommandAlias("fix", "; all compile:scalafix test:scalafix; all scalafmtSbt scalafmtAll") diff --git a/core/shared/src/main/scala/zio/logging/LogAppender.scala b/core/shared/src/main/scala/zio/logging/LogAppender.scala index c95a1778..d469f44a 100644 --- a/core/shared/src/main/scala/zio/logging/LogAppender.scala +++ b/core/shared/src/main/scala/zio/logging/LogAppender.scala @@ -67,7 +67,7 @@ object LogAppender extends PlatformSpecificLogAppenderModifiers { def console[A](logLevel: LogLevel, format: LogFormat[A])(implicit tag: Tag[LogAppender.Service[A]] ): ZLayer[Console, Nothing, Appender[A]] = - make[Console, A](format, (_, line) => putStrLn(line)).map(appender => + make[Console, A](format, (_, line) => putStrLn(line).ignore).map(appender => Has(appender.get.filter((ctx, _) => ctx.get(LogAnnotation.Level) >= logLevel)) ) @@ -78,9 +78,9 @@ object LogAppender extends PlatformSpecificLogAppenderModifiers { format, (ctx, msg) => if (ctx.get(LogAnnotation.Level) == LogLevel.Error) - putStrLnErr(msg) + putStrLnErr(msg).ignore else - putStrLn(msg) + putStrLn(msg).ignore ).map(appender => Has(appender.get.filter((ctx, _) => ctx.get(LogAnnotation.Level) >= logLevel))) def file[A](