Only log event payload at trace level (#20097)

While investigating why login is slow
https://github.com/status-im/status-mobile/issues/20059 and when testing with
accounts with communities, I noticed we are logging huge payloads because they
include data URLs. This makes debugging the app harder.

Therefore, we will now log the full event payload only at the trace level, and
at the debug level we only log the event type.

This problem was first described by ulisesmac.
This commit is contained in:
Icaro Motta
2024-05-20 23:06:38 -03:00
committed by GitHub
parent b358c06a31
commit 88afa09baf
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -35,7 +35,8 @@
(let [^js data (.parse js/JSON event-str)
^js event-js (.-event data)
type (.-type data)]
(log/debug "Signal received" event-str)
(log/debug "Signal received" {:type type})
(log/trace "Signal received" {:payload event-str})
(case type
"node.login" {:fx [[:dispatch
[:profile.login/login-node-signal
+1 -1
View File
@@ -18,7 +18,7 @@
(let [event-type (oops/oget event-js "type")
blockNumber (oops/oget event-js "blockNumber")
accounts (oops/oget event-js "accounts")]
(log/debug "[wallet-subs] New wallet event"
(log/debug "[wallet] Wallet signal received"
{:type event-type
:block-number blockNumber
:accounts accounts})