timbre

pieterbreed 2021-08-30T07:08:25.002Z

Hi everyone; is this channel active? Anyway - I was surprised to find that the logs produced from the JVM's uncaught exception handler thread does not honor the timbre configuration configured in the main thread and honorod by all the other threads. IE - I install a json appender which works on most threads, but the log statement in the uncaught exception handler uses the default timbre config. Is this something that I must fix? How can I apply the config in all threads?

Jan K 2021-08-30T10:43:36.004500Z

@pieterbreed I haven't had that problem. Are you doing something like this?

(timbre/merge-config! ...) ; set timbre config
  (Thread/setDefaultUncaughtExceptionHandler
   (reify Thread$UncaughtExceptionHandler        
     (uncaughtException [_ thread ex]
       (timbre/error ex "Uncaught exception on thread" (.getName thread)))))

pieterbreed 2021-08-30T10:45:05.005Z

that's the essence of what I do yes.

Jan K 2021-08-30T10:50:07.006100Z

That works for me, not sure what could be the problem 😞

pieterbreed 2021-08-30T10:56:27.006800Z

I just reduced the code I run to the essence and it seems to work correctly. Like always it seems that my code is broken. Thanks for the prompt, if something interesting comes up, I'll report it here.