Fork me on GitHub
#timbre
<
2022-02-17
>
pieterbreed08:02:29

Hi all, I'm running unexpectedly into a problem where I'm losing log statements made on core.async thread-pool threads. I have instrumented with println 's which produce output, so I know the log statements get executed, but no output is produced. On my main threads (not sure what the difference is, really...) the timbre log statements produce the correct output. Is this a known issue?

tanzoniteblack18:02:59

what’s your config look like?

pieterbreed09:02:20

I'm seeing this with default cfg. When I open the repl to that namespace and run log statements on the repl, they produce output. It's only lost on some threads, and those threads seem to be the one that comes from core.async.

{:min-level :debug,
 :ns-filter #{"*"},
 :middleware [],
 :timestamp-opts {:pattern :iso8601, :locale :jvm-default, :timezone :utc},
 :output-fn #function[taoensso.timbre/default-output-fn],
 :appenders
 {:println
  {:enabled? true,
   :async? false,
   :min-level nil,
   :rate-limit nil,
   :output-fn :inherit,
   :fn #function[taoensso.timbre.appenders.core/println-appender/fn--3018]}}}

Eugen04:06:21

it might be that timbre is using thread locals ?! at least that would be the difference: threads would use different thread contexts and thread local variables. but I am just a person walking by, so take it with a block of salt :)