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 Jul 18, 2023
1 parent 6fcc456 commit b6a6429
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 @@ -609,7 +609,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 @@ -654,7 +654,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 @@ -795,7 +795,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 @@ -1194,6 +1194,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 b6a6429

Please sign in to comment.