mirror of
https://github.com/penpot/penpot.git
synced 2025-01-22 14:39:45 -05:00
✨ Add the ability to pass body to a log entry
This commit is contained in:
parent
4b6d3546e0
commit
e0f2c4e0aa
1 changed files with 20 additions and 5 deletions
|
@ -153,14 +153,29 @@
|
|||
(defn build-message
|
||||
[props]
|
||||
(loop [props (seq props)
|
||||
result []]
|
||||
result []
|
||||
body nil]
|
||||
(if-let [[k v] (first props)]
|
||||
(if (simple-ident? k)
|
||||
(cond
|
||||
(simple-ident? k)
|
||||
(recur (next props)
|
||||
(conj result (str (name k) "=" (pr-str v))))
|
||||
(conj result (str (name k) "=" (pr-str v)))
|
||||
body)
|
||||
|
||||
(= ::body k)
|
||||
(recur (next props)
|
||||
result))
|
||||
(str/join ", " result))))
|
||||
result
|
||||
v)
|
||||
|
||||
:else
|
||||
(recur (next props)
|
||||
result
|
||||
body))
|
||||
|
||||
(let [message (str/join ", " result)]
|
||||
(if (string? body)
|
||||
(str message "\n" body)
|
||||
message)))))
|
||||
|
||||
(defn build-stack-trace
|
||||
[cause]
|
||||
|
|
Loading…
Add table
Reference in a new issue