-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamically add log handlers #54
Comments
I would probably just store the log function in a mutable variable like am IORef and read the function every time logging is necessary. Would that approach work for you? |
That approach would work (though I would use a
What do you think ? |
I don't see the distinction you're making. |
I'm simply asking whether you would consider adding some higher-level features to |
The answer to that is that no, I'm not opposed in principle to adding new On Wed, Feb 18, 2015, 7:06 PM k0ral [email protected] wrote:
|
The goal is to be able to dynamically add/remove log handlers at runtime. It could look like that: a distinct typeclass that offers a |
The current API forces one to choose the log backend once and for all when
runLoggingT
is called. This may be undesirable, as you may want to add new log handlers dynamically afterwards.The solution I'm currently using is to feed a broadcast
TChan
as a log backend, to which I can dynamically subscribe in as many log handlers as I want.This is quite boilerplate as it seems
monad-logger
wasn't designed to be used in such a way, so I'm wondering: would you consider augmentingmonad-logger
to handle/facilitate that use case ?Thank you.
The text was updated successfully, but these errors were encountered: