 ;;                                                                            ;;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
+(def ^:dynamic *print-streams*  false)
+
+(defmacro printf-stream [& args]
+  `(when *print-streams*
+     (printf ~@args)))
+
 
 (def all-events-counter
   "return a function which is a counter




(defn- normalize-streams-with-defaults
  "apply streams defaults"
  [config]
  (-> config

    component/Lifecycle


  (start [{done :routes config :config :as this}]
    (if-not done
      (as-> this $
          (assoc $ :global-stores    (atom {}))
          (assoc $ :output-collector (atom nil))
          (assoc $ :routes (dispatch-group-by (build-routes $))))
      this))


  (stop [{done :routes :as this}]
    (if done
      (-> this
          (assoc :routes            nil)
          (assoc :global-stores     nil)
          (assoc :output-collector  nil))
      this)))


