harness.zio.HarnessEnv.scala Maven / Gradle / Ivy
package harness.zio
import zio.*
type HarnessEnv = Logger & Telemetry & FileSystem & Sys & HConfig
object HarnessEnv {
def defaultLayer: ULayer[HarnessEnv] =
ZLayer.succeed(Logger.default()) ++
ZLayer.succeed(Telemetry.log) ++
FileSystem.liveLayer.orDie ++
Sys.liveLayer(false) ++
HConfig.layer.empty
def defaultLayer(logLevel: Logger.LogLevel): ULayer[HarnessEnv] =
ZLayer.succeed(Logger.default(defaultMinLogTolerance = logLevel)) ++
ZLayer.succeed(Telemetry.log) ++
FileSystem.liveLayer.orDie ++
Sys.liveLayer(false) ++
HConfig.layer.empty
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy