Skip to content

Commit cc90ea7

Browse files
imherreraoshai
authored andcommitted
Append entries of payload to LoggingEventBuilder so implementations can make use of this data
1 parent 894871f commit cc90ea7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/javaMain/kotlin/io/github/oshai/kotlinlogging/slf4j/internal/LocationIgnorantKLogger.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ internal class LocationIgnorantKLogger(override val underlyingLogger: Logger) :
2424
KLoggingEventBuilder().apply(block).run {
2525
val builder = underlyingLogger.atLevel(level.toSlf4j())
2626
marker?.toSlf4j()?.let { builder.addMarker(it) }
27+
payload?.forEach { (key, value) -> builder.addKeyValue(key, value) }
2728
builder.setCause(cause)
2829
builder.log(message)
2930
}

0 commit comments

Comments
 (0)