Skip to content

Commit

Permalink
[new] Add callsite :?column to logging data
Browse files Browse the repository at this point in the history
Makes use of the new info new info now available at compile-time.
  • Loading branch information
ptaoussanis committed Sep 27, 2023
1 parent cd1f86d commit 1173427
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/taoensso/timbre.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@
(defn- protected-fn [error-msg f]
(fn [data]
(enc/catching (f data) t
(let [{:keys [level ?ns-str ?file ?line #_?column]} data]
(let [{:keys [level ?ns-str ?file ?line ?column]} data]
(throw
(ex-info error-msg
{:output-fn f
Expand Down Expand Up @@ -655,7 +655,7 @@
:?ns-str ?ns-str
:?file ?file
:?line ?line
;; :?column ?column
:?column ?column
#?(:clj :hostname_) #?(:clj (delay (get-hostname)))
:error-level? (contains? #{:error :fatal} level)
:?err ?err
Expand Down Expand Up @@ -796,7 +796,7 @@
* `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}
:?ns-str :?file :?line :?column}
Supports compile-time elision when compile-time const vals
provided for `level` and/or `?ns-str`.
Expand Down Expand Up @@ -1195,6 +1195,7 @@
:?ns-str ; String, or nil
:?file ; String, or nil
:?line ; Integer, or nil
:?column ; Integer, or nil
:?err ; First-arg platform error, or nil
:?meta ; First-arg map when it has ^:meta metadata, used as a
way of passing advanced per-call options to appenders
Expand Down

0 comments on commit 1173427

Please sign in to comment.