taoensso / timbre

Pure Clojure/Script logging library
https://www.taoensso.com/timbre
Eclipse Public License 1.0
1.44k stars 171 forks source link

How to get thread and process in this way. #336

Closed leon-zhang-guoao closed 2 years ago

leon-zhang-guoao commented 3 years ago
(defn json-output-fn
  [{:keys [vargs_ hostname_ ?file timestamp_ level ?line ] :as args}])

I can't find the parameters of 'thread' and 'process'. Is there any way to get them?

ptaoussanis commented 2 years ago

@leon-zhang-guoao Hi Leon,

These are not parameters provided by default to Timbre appenders, see here.

You'll need to get any relevant thread/process info via the relevant Java API - then you could attach this info in your output fn, and/or via Timbre middleware.

Hope that helps!