From d1d03071e2bbde5b002aed74ceed65c84cbb1fdd Mon Sep 17 00:00:00 2001 From: Adam Fraser Date: Thu, 5 May 2022 08:58:16 -0700 Subject: [PATCH] implement remove default loggers (#450) --- core/shared/src/main/scala/zio/logging/package.scala | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/shared/src/main/scala/zio/logging/package.scala b/core/shared/src/main/scala/zio/logging/package.scala index e6ee33e2..fe84a22f 100644 --- a/core/shared/src/main/scala/zio/logging/package.scala +++ b/core/shared/src/main/scala/zio/logging/package.scala @@ -100,6 +100,11 @@ package object logging { } yield () } + val removeDefaultLoggers: ZLayer[Any, Nothing, Unit] = { + implicit val trace = Trace.empty + ZLayer.scoped(FiberRef.currentLoggers.locallyScopedWith(_ -- Runtime.defaultLoggers)) + } + private def makeStringLogger( destination: Path, format: LogFormat,