Implementing Custom Log Level from Configuration in Effect

For some reason I can't figure out the code to use a custom log level from a configuration in a certain effect:

Effect.gen(function*() {
  // The effect.
}).pipe(
  AppConfig.pipe(Effect.map(cfg => Logger.withMinimumLogLevel(cfg.namespace.logLevel)))
)


Obviously pieces are missing here and these types are wrong, but hopefully it illustrates the point. I want this effect to be called with the log level defined in my App Configuration layer (which otherwise works fine).
Was this page helpful?