diff --git a/src/taoensso/timbre.clj b/src/taoensso/timbre.clj index ba0d1ae..25bdf54 100644 --- a/src/taoensso/timbre.clj +++ b/src/taoensso/timbre.clj @@ -72,7 +72,7 @@ (throw (Exception. (format "Invalid logging level: %s" level))))) (def ^:private levels-compare (memoize (fn [x y] (- (level-checked-score x) - (level-checked-score y))))) + (level-checked-score y))))) (declare config) ;; Used in macros, must be public: @@ -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 _))))}}}) @@ -299,7 +299,7 @@ :format (if-not (next args) (str args) (apply format args)) :print-str (apply print-str args) - :nil nil))))) + :nil nil))))) juxtfn-args (assoc juxtfn-args :timestamp (timestamp-fn instant)) juxtfn-args (assoc juxtfn-args ;; DEPRECATED, here for backwards comp: diff --git a/src/taoensso/timbre/profiling.clj b/src/taoensso/timbre/profiling.clj index eaf43fc..edf3ae3 100644 --- a/src/taoensso/timbre/profiling.clj +++ b/src/taoensso/timbre/profiling.clj @@ -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!")))