mirror of https://github.com/status-im/timbre.git
Message formatting: don't call `format` unless formatting args are provided
This commit is contained in:
parent
a7fbaf087a
commit
a547674bc2
|
@ -27,6 +27,7 @@ Overall quite happy with the state of Timbre as of this release. No major antici
|
|||
### Fixes
|
||||
* [#38] Broken namespace filter (mlb-).
|
||||
* [unreported] Messages are now generated _after_ middleware has been applied, allowing better filtering performance and more intuitive behaviour (e.g. changes to args in middleware will now automatically percolate to message content).
|
||||
* [unreported] (logf <level> "hello %s") was throwing due to lack of formatting args.
|
||||
|
||||
|
||||
## v2.6.3 → v2.7.1
|
||||
|
|
|
@ -296,7 +296,8 @@
|
|||
(assoc :message
|
||||
(when-not (empty? args)
|
||||
(case msg-type
|
||||
:format (apply format args)
|
||||
:format (if-not (next args) (str args)
|
||||
(apply format args))
|
||||
:print-str (apply print-str args)
|
||||
:nil nil)))))
|
||||
juxtfn-args (assoc juxtfn-args :timestamp (timestamp-fn instant))
|
||||
|
|
Loading…
Reference in New Issue