Effect CommunityEC
Effect Community3y ago
2 replies
Alex Dixon

What is the best way to use a custom Effect logger everywhere?

I have a situation where I jump in and out of different runtimes and sometimes outside an Effect context entirely. I would like to use the logger I've configured with anywhere in my program though...just like I'd use console.log, as a one liner.

I'm ok with Effect.runSync(Effect.logError ...)) but the default logger is being used. I was wondering if there was a way to configure it globally for the process as a default. If there's a better solution I'm ok with that too!
Was this page helpful?