Back

log! (clj)

(source)

macro

(log! {:as opts, :keys [loc level msg-type args vargs config ?err ?base-data spying?], :or {config (quote clojure.core/*config*), ?err :auto}}) (log! level msg-type args & [opts])
Core low-level log macro. Useful for tooling/library authors, etc. * `level` - must eval to a valid logging level * `msg-type` - must eval to e/o #{:p :f nil} * `args` - arguments seq (ideally vec) for logging call * `opts` - ks e/o #{:config ?err ?base-data spying? :?ns-str :?file :?line :?column} Supports compile-time elision when compile-time const vals provided for `level` and/or `?ns-str`. Logging wrapper examples: (defn log-wrapper-fn [& args] (timbre/log! :info :p args)) (defmacro log-wrapper-macro [& args] (timbre/keep-callsite `(timbre/log! :info :p ~args)))

Examples