mirror of https://github.com/status-im/timbre.git
This commit is contained in:
parent
2c53586e65
commit
b21d5c3d6c
|
@ -164,14 +164,14 @@
|
|||
{:standard-out
|
||||
{:doc "Prints to *out*/*err*. Enabled by default."
|
||||
:min-level nil :enabled? true :async? false :rate-limit nil
|
||||
:fn (fn [{:keys [error? output]}] ; Use any appender args
|
||||
:fn (fn [{:keys [error? output]}] ; Can use any appender args
|
||||
(binding [*out* (if error? *err* *out*)]
|
||||
(str-println output)))}
|
||||
|
||||
:spit
|
||||
{:doc "Spits to `(:spit-filename :shared-appender-config)` file."
|
||||
:min-level nil :enabled? false :async? false :rate-limit nil
|
||||
:fn (fn [{:keys [ap-config output]}] ; Use any appender args
|
||||
:fn (fn [{:keys [ap-config output]}] ; Can use any appender args
|
||||
(when-let [filename (:spit-filename ap-config)]
|
||||
(try (spit filename output :append true)
|
||||
(catch java.io.IOException _))))}}})
|
||||
|
|
|
@ -119,7 +119,7 @@
|
|||
(profile :info :defnp-test (foo 5)))
|
||||
|
||||
(comment
|
||||
(profile :info :Sleepy-threads
|
||||
(profile :info :sleepy-threads
|
||||
(dotimes [n 5]
|
||||
(Thread/sleep 100) ; Unaccounted
|
||||
(p :1ms (Thread/sleep 1))
|
||||
|
@ -143,4 +143,4 @@
|
|||
|
||||
(profile :info :Arithmetic (dotimes [n 100] (my-fn)))
|
||||
|
||||
(sampling-profile :info 0.2 :Sampling-test (p :string "Hello!")))
|
||||
(sampling-profile :info 0.2 :sampling-test (p :string "Hello!")))
|
||||
|
|
Loading…
Reference in New Issue