improve: enable collect logs before login (#16392)
This commit is contained in:
parent
e2b7a299b4
commit
ab16ca34dd
|
@ -13,7 +13,8 @@
|
||||||
[utils.datetime :as datetime]
|
[utils.datetime :as datetime]
|
||||||
[status-im.utils.platform :as platform]
|
[status-im.utils.platform :as platform]
|
||||||
[status-im.utils.types :as types]
|
[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")
|
(def report-email "error-reports@status.im")
|
||||||
|
|
||||||
|
@ -96,8 +97,11 @@
|
||||||
(re-frame/dispatch [:show-client-error]))))))
|
(re-frame/dispatch [:show-client-error]))))))
|
||||||
|
|
||||||
(defn logs-enabled?
|
(defn logs-enabled?
|
||||||
[db]
|
[{:keys [multiaccount]}]
|
||||||
(not (string/blank? (get-in db [:multiaccount :log-level]))))
|
(let [log-level (if multiaccount ;; already login
|
||||||
|
(get multiaccount :log-level)
|
||||||
|
config/log-level)]
|
||||||
|
(not (string/blank? log-level))))
|
||||||
|
|
||||||
(rf/defn send-logs
|
(rf/defn send-logs
|
||||||
{:events [:logging.ui/send-logs-pressed]}
|
{:events [:logging.ui/send-logs-pressed]}
|
||||||
|
|
Loading…
Reference in New Issue