Add ability to emit log messages to DbTx monad
Currently the subset of effects that the DbTx
supports is very small, and that's by design: given that DB transactions needs to be "rollbackable" we need the effects to be chosen carefully as they need to be reversible.
Emitting log messages falls in a bit of a gray area: clearly is not possible to "rollback" writing characters to an IO Handle
, but the effect of emitting a log message is benign (i.e. it's a side effect that doesn't write to disk, etc).
For this reason, I think I'm in favour of adding support for emitting log messages to a DbTx
, so that we can restore some calls to logLocM
that we had to comment out when rewriting the DB operations in terms of DBQuery
and DBUpdate
.