mirror of https://github.com/status-im/timbre.git
Use `defonce` instead of `def` for config.
This commit is contained in:
parent
f454ac9afb
commit
068d9bf248
|
@ -21,18 +21,19 @@
|
||||||
[& xs]
|
[& xs]
|
||||||
(print (str (str/join \space xs) \newline)))
|
(print (str (str/join \space xs) \newline)))
|
||||||
|
|
||||||
(def config
|
(defonce config
|
||||||
"This map atom controls everything about the way Timbre operates. In
|
^{:doc
|
||||||
particular note the flexibility to add arbitrary appenders.
|
"This map atom controls everything about the way Timbre operates. In
|
||||||
|
particular note the flexibility to add arbitrary appenders.
|
||||||
|
|
||||||
An appender is a map with keys:
|
An appender is a map with keys:
|
||||||
:doc, :min-level, :enabled?, :async?, :max-message-per-msecs, :fn?
|
:doc, :min-level, :enabled?, :async?, :max-message-per-msecs, :fn?
|
||||||
|
|
||||||
An appender's fn takes a single map argument with keys:
|
An appender's fn takes a single map argument with keys:
|
||||||
:ap-config, :level, :error?, :instant, :timestamp, :ns, :message, :more,
|
:ap-config, :level, :error?, :instant, :timestamp, :ns, :message, :more,
|
||||||
:profiling-stats (when applicable)
|
:profiling-stats (when applicable)
|
||||||
|
|
||||||
See source code for examples."
|
See source code for examples."}
|
||||||
(atom {:current-level :debug
|
(atom {:current-level :debug
|
||||||
|
|
||||||
;;; Allow log filtering by namespace patterns (e.g. ["my-app.*"]).
|
;;; Allow log filtering by namespace patterns (e.g. ["my-app.*"]).
|
||||||
|
|
Loading…
Reference in New Issue