Fork me on GitHub

Hello, it's me again! Since I asked my last question we've decided to double down on timbre and replace the logging implementation in another project (pedestal + logback) with timbre, using However, I've noticed a difference when using e.g. io.pedestal.log/info compared to taoensso.timbre/info. slf4j-timbre seems to be sending the pedestal logs to timbre as a string but that's too early because I'm using a modified version of (that I can't share unfortunately) to convert the logs to JSON and assoc the key value pairs to the final map. Here's an example of that:

( (with-out-str (io.pedestal.log/info :msg "lala")))
  {"msg" "{:msg \"lala\", :line 1}", "timestamp" "2022-12-13T17:36:25Z", "level" "info", "thread" "nREPL-session-a20b4dae-bcda-465d-b781-bfa3416ba011", "hostname" "...", "file" "log.clj", "line" 116}
  ( (with-out-str (taoensso.timbre/info :msg "lala")))
  {"msg" "lala", "timestamp" "2022-12-13T17:36:54Z", "level" "info", "thread" "nREPL-session-a20b4dae-bcda-465d-b781-bfa3416ba011", "hostname" "..", "file" ".../dev.clj", "line" 1}
How can I make the first example look more like the second? I could explicitly try to convert every string coming to the JSON appender to EDN and then to JSON but that sounds ridiculously expensive. What are my alternatives, besides replacing io.pedestal.log requires with taoensso.timbre? edit: also pedestal seems to be reporting the wrong file/line -it's the io.pedestal.log namespace- but I can live with that Update: Doesn't seem to be possible, I decided to replace all the requires of io.pedestal.log with taoensso.timbre, which at least takes care of my logs. I don't care much about the ones deeper in the stack.