Skip to content

Commit

Permalink
Fix log listener2
Browse files Browse the repository at this point in the history
  • Loading branch information
ogesaku committed Feb 17, 2024
1 parent 2a80c7b commit e5fc140
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions klog/src/main/kotlin/com/coditory/klog/KlogContext.kt
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,11 @@ internal data class KlogContext(
publisher = serialAsyncLogPublisher,
batchSize = config.batchSize,
maxBatchStaleness = config.maxBatchStaleness,
listener = if (config.serialize) LogPublisherListener.middle(descriptor, klogConfig.listener)
else LogPublisherListener.terminal(descriptor, klogConfig.listener),
listener = if (config.serialize) {
LogPublisherListener.middle(descriptor, klogConfig.listener)
} else {
LogPublisherListener.terminal(descriptor, klogConfig.listener)
},
klogErrLogger = klogConfig.klogErrLogger,
)
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class KlogBatchingPublisherSpec : FunSpec({
"Received: Hello",
"StreamEnd: Hello",
"LogEnd: Hello",
"Published: [Hello]"
"Published: [Hello]",
)
}

Expand Down

0 comments on commit e5fc140

Please sign in to comment.