Skip to content

Commit

Permalink
use ZIO.logAnnotations
Browse files Browse the repository at this point in the history
  • Loading branch information
somdoron committed Oct 9, 2024
1 parent 9058db7 commit 1b63abe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/shared/src/main/scala/zio/logging/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ package object logging extends LoggerLayers {
new ZIOAspect[Nothing, Any, Nothing, Any, Nothing, Any] {
def apply[R, E, A](zio: ZIO[R, E, A])(implicit trace: Trace): ZIO[R, E, A] =
for {
annotations <- FiberRef.currentLogAnnotations.get
annotations <- ZIO.logAnnotations
currentLoggerName = annotations.get(loggerNameAnnotationKey)
newLoggerName = currentLoggerName.fold(value)(currentLoggerName => s"$currentLoggerName.$value")
a <- ZIO.logAnnotate(loggerNameAnnotationKey, newLoggerName)(zio)
Expand Down

0 comments on commit 1b63abe

Please sign in to comment.