0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-04-12 15:01:28 -05:00

🐛 Fix issue on logging (backend)

This commit is contained in:
Andrey Antukh 2022-03-22 14:33:27 +01:00
parent ad262f6fb3
commit bf6211903c

View file

@ -184,11 +184,15 @@
`(do
(send-off logging-agent
(fn [_#]
(with-context (into {:id (uuid/next)}
(get-error-context ~cause)
~context)
(->> (or ~raw (build-map-message ~props))
(write-log! ~logger-sym ~level-sym ~cause)))))
(try
(with-context (-> {:id (uuid/next)}
(into ~context)
(into (get-error-context ~cause)))
(->> (or ~raw (build-map-message ~props))
(write-log! ~logger-sym ~level-sym ~cause)))
(catch Throwable cause#
(write-log! ~logger-sym (get-level :error) cause#
"unexpected error on writting log")))))
nil)
`(let [message# (or ~raw (build-map-message ~props))]
(write-log! ~logger-sym ~level-sym ~cause message#)