Skip to content

Commit

Permalink
#401 fix missing value in label method (#402) (#404)
Browse files Browse the repository at this point in the history
Co-authored-by: zhangzhonglai <zhangzhonglai@gmail.com>
  • Loading branch information
jdegoes and zhangzhonglai authored Jan 22, 2022
1 parent 17b25e7 commit 929abb0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/shared/src/main/scala/zio/logging/LogFormat.scala
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,12 @@ object LogFormat {
}

def label(label: => String, value: LogFormat): LogFormat =
LogFormat.make { (builder, _, _, _, _, _, _, _) =>
LogFormat.make { (builder, trace, fiberId, logLevel, message, context, spans, location) =>
builder.openKey()
try builder.appendText(label)
finally builder.closeKeyOpenValue()

try value.unsafeFormat(builder)
try value.unsafeFormat(builder)(trace, fiberId, logLevel, message, context, spans, location)
finally builder.closeValue()
}

Expand Down

0 comments on commit 929abb0

Please sign in to comment.