mirror of
https://github.com/status-im/timbre.git
synced 2025-02-09 18:33:29 +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
|
||||
(case msg-type
|
||||
nil ""
|
||||
:p (str-join vargs)
|
||||
:f (enc/format* (have string? ?msg-fmt) vargs)))
|
||||
:p (str-join 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
|
||||
;; rate limiting, etc.
|
||||
|
Loading…
x
Reference in New Issue
Block a user