Skip to content

Commit

Permalink
improve: enable collect logs before login
Browse files Browse the repository at this point in the history
  • Loading branch information
qfrank committed Jun 26, 2023
1 parent e2b7a29 commit 4464975
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/status_im/utils/logging/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
[utils.datetime :as datetime]
[status-im.utils.platform :as platform]
[status-im.utils.types :as types]
[status-im2.common.log :as log]))
[status-im2.common.log :as log]
[status-im2.config :as config]))

(def report-email "error-reports@status.im")

Expand Down Expand Up @@ -96,8 +97,11 @@
(re-frame/dispatch [:show-client-error]))))))

(defn logs-enabled?
[db]
(not (string/blank? (get-in db [:multiaccount :log-level]))))
[{:keys [multiaccount]}]
(let [log-level (if multiaccount ;; already login
(get multiaccount :log-level)
config/log-level)]
(not (string/blank? log-level))))

(rf/defn send-logs
{:events [:logging.ui/send-logs-pressed]}
Expand Down

0 comments on commit 4464975

Please sign in to comment.