Back
merge-config! (clj)
(source)function
(merge-config! config)
Examples
timbre
(ns taoensso.timbre.appenders.community.rotor-test
(:require
[clojure.test :refer :all]
[clojure.java.io :as io]
[clojure.set :as set]
[taoensso.timbre :as timbre]
[taoensso.timbre.appenders.community.rotor :as rotor]))
(defn setup
[n-logs]
(timbre/merge-config!
{:appenders {:rotor (rotor/rotor-appender
{:path logfile
:max-size 200
:backlog n-logs})}}))
vlaaad/reveal
(ns e07-timbre-tap-appender
(:require [taoensso.timbre :as log]
[vlaaad.reveal :as r]))
(log/merge-config!
{:appenders
{:println {:enabled? false}
:reveal {:enabled? true
:fn (fn [data]
(tap> (r/submit
(r/as data
(r/raw-string
(format "[%1$tH:%1$tM:%1$tS.%1$tL %2$s:%3$s]: %4$s"
(:instant data)
(:?ns-str data)
(:?line data)
@(:msg_ data))
{:fill ({:info :symbol
:report :symbol
:warn "#db8618"
:error :error
:fatal :error}
(:level data)
:util)})))))}}})
fulcrologic/fulcro-template
(ns app.development-preload
(:require
[com.fulcrologic.fulcro.algorithms.timbre-support :as ts]
[taoensso.timbre :as log]))
(js/console.log "Turning logging to :debug (in app.development-preload)")
(log/set-level! :debug)
(log/merge-config! {:output-fn ts/prefix-output-fn
:appenders {:console (ts/console-appender)}})
lgessler/glam
(ns glam.client.development-preload
(:require
[com.fulcrologic.fulcro.algorithms.timbre-support :as ts]
[taoensso.timbre :as log]))
(js/console.log "Turning logging to :debug (in app.development-preload)")
(log/set-min-level! :debug)
(log/merge-config! {:output-fn ts/prefix-output-fn
:appenders {:console (ts/console-appender)}})
dvingo/dv.fulcro-template
(ns {{namespace}}.client.development-preload
(:require
[com.fulcrologic.fulcro.algorithms.timbre-support :as ts]
[{{namespace}}.malli-registry :as reg]
[malli.registry :as mr]
[malli.dev.cljs]
[taoensso.timbre :as log]))
(js/console.log "Turning logging to :debug (in app.development-preload)")
(log/set-level! :debug)
(log/merge-config! {:output-fn ts/prefix-output-fn
:appenders {:console (ts/console-appender)}})
(mr/set-default-registry! (mr/mutable-registry reg/registry*))
replikativ/datahike-frontend
(ns app.development-preload
(:require
[com.fulcrologic.fulcro.algorithms.timbre-support :as ts]
[taoensso.timbre :as log]))
(js/console.log "Turning logging to :debug (in app.development-preload)")
(log/set-level! :debug)
(log/merge-config! {:output-fn ts/prefix-output-fn
:appenders {:console (ts/console-appender)}})