On-the-fly logging typeclass and monad transformer