Skip to content

Commit

Permalink
implement remove default loggers (#450)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamgfraser authored May 5, 2022
1 parent 21df6c5 commit d1d0307
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/shared/src/main/scala/zio/logging/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit d1d0307

Please sign in to comment.