mirror of
https://github.com/status-im/timbre.git
synced 2025-02-10 10:46:32 +00:00
Improve error message for logging calls with missing format pattern
This commit is contained in:
parent
4874458007
commit
4eb8433f8e
@ -389,8 +389,18 @@
|
|||||||
(delay
|
(delay
|
||||||
(case msg-type
|
(case msg-type
|
||||||
nil ""
|
nil ""
|
||||||
:p (str-join vargs)
|
:p (str-join vargs)
|
||||||
:f (enc/format* (have string? ?msg-fmt) vargs)))
|
:f #_(enc/format* (have string? ?msg-fmt) vargs)
|
||||||
|
(do
|
||||||
|
(when-not (string? ?msg-fmt)
|
||||||
|
(throw
|
||||||
|
(ex-info "Timbre format-style logging call without a format pattern (string)"
|
||||||
|
#_data
|
||||||
|
{:level level
|
||||||
|
:location (str (or ?ns-str ?file "?") ":"
|
||||||
|
(or ?line "?"))})))
|
||||||
|
|
||||||
|
(enc/format* ?msg-fmt vargs))))
|
||||||
|
|
||||||
;; Uniquely identifies a particular logging call for
|
;; Uniquely identifies a particular logging call for
|
||||||
;; rate limiting, etc.
|
;; rate limiting, etc.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user