Effect CommunityEC
Effect Community•2y ago•
5 replies
joe.esteves

Creating SqlClient layer with environment-specific logging

Hi, I'm trying to create a SqlClient layer that logs the sql statement to the console, so I can provide only on the dev enviroments, but change it for other envs like prod.

So far I got this very naive implementation that is working for very basic queries. As it is I can't use sql.insert (an all the other helpers)

I was seeking for some help on how to this on the Effect way. I saw someone mention using transofmer API to inject the logger, but I'm kind of lost on how to achive this.
🧵 (continues)
Was this page helpful?