Done!

Having said that, I don't suggest anyone really edit their config 
line-by-line like this. What I do is create a map of everything I need 
during environment config and just merge it over the Timbre defaults with 
something like this:

(defn deep-merge-with ; From clojure.contrib.map-utils                     
                                                                            
                           
  "Like 'merge-with' but merges maps recursively, applying the given fn     
                                                                            
                          
  only when there's a non-map at a particular level.                       
                                                                            
                           
                                                                            
                                                                            
                          
  (deepmerge + {:a {:b {:c 1 :d {:x 1 :y 2}} :e 3} :f 4}                   
                                                                            
                           
               {:a {:b {:c 2 :d {:z 9} :z 3} :e 100}})                     
                                                                            
                           
  -> {:a {:b {:z 3, :c 3, :d {:z 9, :x 1, :y 2}}, :e 103}, :f 4}"           
                                                                            
                          
  [f & maps]                                                               
                                                                            
                           
  (apply                                                                   
                                                                            
                           
   (ƒ m [& maps]                                                           
                                                                            
                           
     (if (every? map? maps)                                                 
                                                                            
                          
       (apply merge-with m maps)                                           
                                                                            
                           
       (apply f maps)))                                                     
                                                                            
                          
   maps))                                                                   
                                                                            
                          
                                                                            
                                                                            
                          
(defn deep-merge                                                           
                                                                            
                           
  "Partial of 'deep-merge-with'."                                           
                                                                            
                          
  [& maps]                                                                 
                                                                            
                           
  (apply deep-merge-with (ƒ [x y] y) maps))  

-- 
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

Reply via email to