Monix
Module slog4s-zio
provides basic integration with ZIO effect system. It
leverages FiberRef
for context propagation.
slf4j example
This example demonstrates how to make an slf4j specific instance of LoggingContext
and LoggerFactory
backed by ZIO’s FiberRef
.
import cats.effect.Sync
import slog4s._
import slog4s.shared._
import slog4s.slf4j._
import slog4s.zio._
import _root_.zio._
def make(implicit F: Sync[Task]): Task[LoggingRuntime[Task]] = {
Slf4jFactory[Task].makeFromBuilder(ZIOContextRuntimeBuilder.Task)
}