-
-
Notifications
You must be signed in to change notification settings - Fork 176
Closed
Labels
Description
We recently upgraded from 6.5.0 to 6.6.1 and encountered that our application does not start anymore because of:
java.lang.ClassCastException: class clojure.lang.Var$Unbound cannot be cast to class java.io.Writer (clojure.lang.Var$Unbound is in unnamed module of loader 'app'; java.io.Writer is in module java.base of loader 'bootstrap')
at taoensso.encore$println.invokeStatic(encore.cljc:4943)
at taoensso.timbre.appenders.core$println_appender$fn__23530.invoke(core.cljc:44)
at taoensso.timbre$_log_BANG_$fn__23961.invoke(timbre.cljc:595)
at clojure.lang.PersistentArrayMap.kvreduce(PersistentArrayMap.java:429)
at clojure.core$fn__8525.invokeStatic(core.clj:6908)
at clojure.core$fn__8525.invoke(core.clj:6888)
at clojure.core.protocols$fn__8257$G__8252__8266.invoke(protocols.clj:175)
at clojure.core$reduce_kv.invokeStatic(core.clj:6919)
at taoensso.timbre$_log_BANG_.invokeStatic(timbre.cljc:597)
at ...
I traced this back to *out* being bound to taoensso.timbre/default-out when using a custom println appender created like this:
(timbre/println-appender {:stream :std-out})It seems to me that default-out is declared, but never initialized. I found this commit that deleted the defs for default-out and default-err: 5a6a9d9
#?(:clj (def default-out (java.io.OutputStreamWriter. System/out)))
#?(:clj (def default-err (java.io.PrintWriter. System/err)))Maybe these lines have been deleted accidentally? Or a refactoring was incomplete?