add module with short names to log with severity
ibotty opened this issue · 5 comments
Maybe something to be imported qualified. E.g.
import Control.Monad.Log.LogMessage as Log
f = do
Log.debug "debug message"
Log.errror "error message"
What do you think?
1.1.0 will have the following:
logging-effect/src/Control/Monad/Log.hs
Line 43 in b83c7a1
logging-effect/src/Control/Monad/Log.hs
Line 209 in b83c7a1
Would they be sufficient?
I was just about to comment on that. Yes, they are sufficient. I prefer a separate module to be imported qualified, but I am fine either way. Is there an ETA?
BTW: now, that you are here: What do you think about an extensible exception-like thing for Log messages. I could (and do) roll my own sum type for typed log messages pretty often, but having an extensible framework in place would be great. Doc
is not so great for structured logging.
ETA is within the next 2 weeks at most, but hopefully this week.
Doc
is only for when you want to log to something that is unstructured - if you have a sink that supports more structure then the idea is to build your own batched handler and work with whatever message type you like. There are so many options here I'm not sure what an extensible framework would look like. Happy to chat about that, if you want to open another issue with what you have in mind.
So much for two weeks, but now released!