mirror of
https://github.com/penpot/penpot.git
synced 2025-02-13 18:48:37 -05:00
✨ Minor improvements on error reporter.
This commit is contained in:
parent
5518f561f0
commit
0bbc006b98
4 changed files with 16 additions and 5 deletions
|
@ -58,9 +58,15 @@
|
|||
<body>
|
||||
<div class="table">
|
||||
<div class="table-row">
|
||||
<div class="table-key">ERID: </div>
|
||||
<div class="table-key" title="Error ID">ERID: </div>
|
||||
<div class="table-val">{{id}}</div>
|
||||
</div>
|
||||
{% if profile-id %}
|
||||
<div class="table-row">
|
||||
<div class="table-key" title="Profile ID">PFID: </div>
|
||||
<div class="table-val">{{profile-id}}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="table-row">
|
||||
<div class="table-key">VERS: </div>
|
||||
<div class="table-val">{{version}}</div>
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
[app.util.json :as json]
|
||||
[app.util.http :as http]
|
||||
[app.util.template :as tmpl]
|
||||
[clojure.pprint :refer [pprint]]
|
||||
[clojure.core.async :as a]
|
||||
[clojure.spec.alpha :as s]
|
||||
[clojure.tools.logging :as log]
|
||||
|
@ -74,7 +73,8 @@
|
|||
[event]
|
||||
(let [^LogEvent levent (deref event)
|
||||
^ReadOnlyStringMap rosm (.getContextData levent)]
|
||||
(into {:message (str event)}
|
||||
(into {:message (str event)
|
||||
:id (uuid/next)} ; set default uuid for cases when it not comes.
|
||||
(comp
|
||||
(map (fn [[key val]]
|
||||
(cond
|
||||
|
|
|
@ -26,7 +26,9 @@
|
|||
(ThreadContext/put
|
||||
(name key)
|
||||
(cond
|
||||
(coll? val) (with-out-str (pprint val))
|
||||
(coll? val)
|
||||
(binding [clojure.pprint/*print-right-margin* 120]
|
||||
(with-out-str (pprint val)))
|
||||
(instance? clojure.lang.Named val) (name val)
|
||||
:else (str val))))
|
||||
data))
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
[clojure.spec.alpha :as s]
|
||||
[integrant.core :as ig]
|
||||
[app.db :as db]
|
||||
[app.http.errors :refer [update-thread-context!]]
|
||||
[buddy.core.codecs :as bc]
|
||||
[buddy.core.nonce :as bn]))
|
||||
|
||||
|
@ -55,7 +56,9 @@
|
|||
[cfg handler]
|
||||
(fn [request]
|
||||
(if-let [profile-id (retrieve-from-request cfg request)]
|
||||
(handler (assoc request :profile-id profile-id))
|
||||
(do
|
||||
(update-thread-context! {:profile-id profile-id})
|
||||
(handler (assoc request :profile-id profile-id)))
|
||||
(handler request))))
|
||||
|
||||
(defmethod ig/pre-init-spec ::session [_]
|
||||
|
|
Loading…
Add table
Reference in a new issue