mirror of https://github.com/status-im/timbre.git
Users have reported seeing `Wrong number of args (9) passed to: timbre/-log!` errors via slf4j-timbre when upgrading from Timbre v4.4.0 -> v4.5.0. slf4j-timbre already uses the correct public API (timbre/log!), so this looks like an AOT issue: a compiled Timbre v4.4.0 `log!` macro expansion is calling a `v4.5.0` `-log!` function and breaking. Unfortunately, looks[1] like a user-level call to `lein clean` isn't enough to resolve the issue. Might be that slf4j-timbre itself needs to be recompiled? Whatever the underlying cause, this should be a reasonable workaround for now. [1] : https://github.com/fzakaria/slf4j-timbre/issues/20#issuecomment-229254285
This commit is contained in:
parent
0a765cb9ca
commit
64dc0f52aa
|
@ -358,7 +358,15 @@
|
||||||
(infof ^:meta {:err (Exception. "ex")} "Hi %s" "steve"))
|
(infof ^:meta {:err (Exception. "ex")} "Hi %s" "steve"))
|
||||||
|
|
||||||
(defn -log! "Core low-level log fn. Implementation detail!"
|
(defn -log! "Core low-level log fn. Implementation detail!"
|
||||||
[config level ?ns-str ?file ?line msg-type ?err vargs_
|
|
||||||
|
;; TODO Temp workaround for
|
||||||
|
;; https://github.com/fzakaria/slf4j-timbre/issues/20 and similar AOT tools
|
||||||
|
([config level ?ns-str ?file ?line msg-type ?err vargs_ ?base-data]
|
||||||
|
;; (throw (ex-info "Invalid internal Timbre call. Please try run `lein clean` to clear out-of-date build artifacts." {}))
|
||||||
|
(-log! config level ?ns-str ?file ?line msg-type ?err vargs_
|
||||||
|
?base-data nil))
|
||||||
|
|
||||||
|
([config level ?ns-str ?file ?line msg-type ?err vargs_
|
||||||
?base-data callsite-id]
|
?base-data callsite-id]
|
||||||
|
|
||||||
(when (log? level ?ns-str config) ; Runtime check
|
(when (log? level ?ns-str config) ; Runtime check
|
||||||
|
@ -490,7 +498,7 @@
|
||||||
(apfn data))))))))
|
(apfn data))))))))
|
||||||
nil
|
nil
|
||||||
(:appenders config))))))
|
(:appenders config))))))
|
||||||
nil)
|
nil))
|
||||||
|
|
||||||
(comment
|
(comment
|
||||||
(-log! *config* :info nil nil nil :p :auto
|
(-log! *config* :info nil nil nil :p :auto
|
||||||
|
|
Loading…
Reference in New Issue