Skip to content

Commit

Permalink
improve tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Denys Fakhritdinov committed Mar 12, 2024
1 parent d6fddf4 commit 86182a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ object LogOfFromLogback {
new LoggingEvent(FQCN, logger, level, msg, throwable, null)
val mdc1 = mdc.context match {
case Some(mdc) => mdc.toSortedMap.asJava
case None => new java.util.HashMap[String, String]
case None => java.util.Collections.emptyMap[String, String]()
}
event.setMDCPropertyMap(mdc1)
logger.callAppenders(event)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class LogOfFromLogbackSpec extends AnyFunSuite with Matchers {
val io = for {
logOf <- LogOfFromLogback[IO]
log <- logOf(getClass)
_ <- log.info("lets start ...")
_ <- log.info("hello from logback", Log.Mdc.Lazy("k" -> "test value for K"))
} yield ()

Expand Down

0 comments on commit 86182a9

Please sign in to comment.