zio-logging
zio-logging copied to clipboard
Spans are not propagated to the log4j backend
A reproducer is available here: https://github.com/lukasz-golebiewski/zio-logging-example
Looks like the solution was to concat LogFormat.spans with the default SLF4J log format.
SLF4J.slf4j(LogFormat.spans + SLF4J.logFormatDefault)
Is there a reason why spans are not being logged in the default format?
Hi @lukasz-golebiewski I think reason for that is that LogFormat of core zio loggers https://github.com/zio/zio-logging/blob/master/core/shared/src/main/scala/zio/logging/LogFormat.scala#L917-L922 also do not contains spans, so they were not added also to slf4j default format
This is interesting, because an app extending ZIOAppDefault without overridden bootstrap, so using the default zio logger, does log spans out of the box