mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01:00
✨ Add the ability to pass body to a log entry
This commit is contained in:
@@ -153,14 +153,29 @@
|
|||||||
(defn build-message
|
(defn build-message
|
||||||
[props]
|
[props]
|
||||||
(loop [props (seq props)
|
(loop [props (seq props)
|
||||||
result []]
|
result []
|
||||||
|
body nil]
|
||||||
(if-let [[k v] (first props)]
|
(if-let [[k v] (first props)]
|
||||||
(if (simple-ident? k)
|
(cond
|
||||||
|
(simple-ident? k)
|
||||||
(recur (next props)
|
(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)
|
(recur (next props)
|
||||||
result))
|
result
|
||||||
(str/join ", " 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
|
(defn build-stack-trace
|
||||||
[cause]
|
[cause]
|
||||||
|
|||||||
Reference in New Issue
Block a user