I have just converted my app to use monad-logger and as a result I have replaced Aff a with LoggerT Aff a in many places in the codebase.
HTTPure.serve is a bit awkward here because it requires that the request handling function return Aff a. This means that the LoggerT Aff a to Aff a transformation has to be done inside the request handling function by using runLoggerT. It might be neater if serve could work with any monads that implement MonadAff - then the logging context could be automatically passed through from the caller.
Is this a good idea?
I have just converted my app to use
monad-loggerand as a result I have replacedAff awithLoggerT Aff ain many places in the codebase.HTTPure.serveis a bit awkward here because it requires that the request handling function returnAff a. This means that theLoggerT Aff atoAff atransformation has to be done inside the request handling function by usingrunLoggerT. It might be neater ifservecould work with any monads that implementMonadAff- then the logging context could be automatically passed through from the caller.Is this a good idea?