Back

swap-config! (clj)

(source)

function

(swap-config! f & args)

Examples

Convex-Dev/convex.cljc
  (:import (java.io FileDescriptor
                    FileWriter))
  (:refer-clojure :exclude [newline])
  (:require [taoensso.timbre :as log]))


(log/swap-config! (fn [config]
                    (-> config
                        (assoc :min-level
                               :info)
                        (update :appenders
                                (fn [appender+]
                                  (-> appender+
                                      (dissoc :println)
                                      (assoc :console
                                             {:enabled? true
                                              :fn       (fn [data]
                                                          (.write out
                                                                  (force (data :output_)))
                                                          (.write out
                                                                  newline)
                                                          (.flush out))})))))))