[fix] Timbre->Telemere appender: don't duplicate output formatting
Some checks are pending
Clj tests / tests (17, ubuntu-latest) (push) Waiting to run
Clj tests / tests (19, ubuntu-latest) (push) Waiting to run
Clj tests / tests (21, ubuntu-latest) (push) Waiting to run
Cljs tests / tests (21, ubuntu-latest) (push) Waiting to run
Graal tests / tests (17, macOS-latest) (push) Waiting to run
Graal tests / tests (17, ubuntu-latest) (push) Waiting to run
Graal tests / tests (17, windows-latest) (push) Waiting to run

BEFORE this commit:

  The Timbre->Telemere appender produced duplicate preamble output
  (timestamp, namespace, etc.). Both Timbre AND Telemere were adding
  preamble info.

AFTER this commit:

  Now ONLY Telemere adds preamble info.
  Timbre's `:output-fn` is ignored.
This commit is contained in:
Peter Taoussanis 2025-12-03 08:18:04 +01:00
parent c99fd044b4
commit 3ea81df34f

View file

@ -190,8 +190,11 @@
:min-level nil
:fn
(fn [data]
(let [{:keys [instant level context ?err output_
?ns-str ?file ?line ?column]} data]
(let [{:keys [instant level context msg-type vargs
?ns-str ?file ?line ?column]} data
format-msg? (enc/identical-kw? msg-type :f)
[error msg vargs] (parse-vargs format-msg? vargs)]
(taoensso.telemere/signal!
{:kind :timbre
@ -203,5 +206,6 @@
:coords (when ?line [?line ?column])
:file ?file ; Non-standard, goes to kvs
:error ?err
:msg (force output_)})))})
:error error
:msg msg
:timbre/vargs vargs})))})