[mod] [#52] signal-preamble-fn should ignore nil :kind (@marksto)

Before this commit: A nil signal `:kind` renders as "DEFAULT".
After  this commit: A nil signal `:kind` isn't rendered at all.

The previous behaviour wasn't particularly useful, and as Mark
helpfully pointed out - makes it difficult to skip `:kind` rendering.

The new behaviour also better matches the behaviour for other signal
keys, which can mostly be dissoc'ed to skip rendering.
This commit is contained in:
Peter Taoussanis 2025-02-27 18:34:04 +01:00
parent 410ed8914c
commit 634cc53405

View file

@ -527,8 +527,7 @@
(when inst (when-let [ff format-inst-fn] (s+spc (ff inst))))
(when level (s+spc (format-level level)))
(if kind (s+spc (sigs/upper-qn kind)) (s+spc "DEFAULT"))
(when kind (s+spc (sigs/upper-qn kind)))
#?(:clj
(when-let [host (get signal :host)]