mirror of https://github.com/status-im/timbre.git
Fix `config` docstring
This commit is contained in:
parent
f16b00a7e9
commit
7c81fc58de
|
@ -3,6 +3,7 @@
|
|||
:url "https://github.com/ptaoussanis/timbre"
|
||||
:license {:name "Eclipse Public License"}
|
||||
:dependencies [[org.clojure/clojure "1.3.0"]
|
||||
[org.clojure/tools.macro "0.1.1"]
|
||||
[clj-stacktrace "0.2.5"]]
|
||||
:profiles {:1.3 {:dependencies [[org.clojure/clojure "1.3.0"]]}
|
||||
:1.4 {:dependencies [[org.clojure/clojure "1.4.0"]]}
|
||||
|
|
|
@ -16,8 +16,7 @@
|
|||
(print (str (str/join \space xs) \newline))
|
||||
(flush))
|
||||
|
||||
(defonce config
|
||||
^{:doc
|
||||
(utils/defonce* config
|
||||
"This map atom controls everything about the way Timbre operates. In
|
||||
particular note the flexibility to add arbitrary appenders.
|
||||
|
||||
|
@ -33,7 +32,7 @@
|
|||
Other keys include: :instant, :timestamp, :hostname, :ns, :error?
|
||||
|
||||
See source code for examples and `utils/deep-merge` for a convenient way
|
||||
to reconfigure appenders."}
|
||||
to reconfigure appenders."
|
||||
(atom {:current-level :debug
|
||||
|
||||
;;; Control log filtering by namespace patterns (e.g. ["my-app.*"]).
|
||||
|
|
|
@ -1,5 +1,14 @@
|
|||
(ns taoensso.timbre.utils
|
||||
{:author "Peter Taoussanis"})
|
||||
{:author "Peter Taoussanis"}
|
||||
(:require [clojure.tools.macro :as macro]))
|
||||
|
||||
(defmacro defonce*
|
||||
"Like `clojure.core/defonce` but supports optional docstring and attributes
|
||||
map for name symbol."
|
||||
{:arglists '([name expr])}
|
||||
[name & sigs]
|
||||
(let [[name [expr]] (macro/name-with-attributes name sigs)]
|
||||
`(clojure.core/defonce ~name ~expr)))
|
||||
|
||||
(defn memoize-ttl
|
||||
"Like `memoize` but invalidates the cache for a set of arguments after TTL
|
||||
|
|
Loading…
Reference in New Issue