On Saturday, 25 July 2015 22:50:55 UTC+8, crocket wrote:
>
> Logging libraries seem to rely on a global config. This looks like a 
> dangerous state that could blow up.
> I researched a little, and there seems to be reader monad and dependency 
> injection, all of which feel awkard.
>
> Is there not a decent approach to passing log config without a global var?
>

If you are using stuartsierra/component, it makes sense to have logging as 
a component within your overall system configuration.

I've found this to be a very useful approach in general: you can swap in / 
out different loggers for testing, you avoid a global var, it makes for 
really easy reloading at the REPL or running multiple concurrent versions 
etc.


-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to