fix: timbre log to react-native start console (#17032)

This commit is contained in:
yqrashawn 2023-08-17 20:51:20 +08:00 committed by GitHub
parent 9cae50dc88
commit 999588e67d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -1,11 +1,11 @@
(ns status-im2.common.log (ns status-im2.common.log
(:require [clojure.string :as string] (:require [clojure.string :as string]
[native-module.core :as native-module]
[re-frame.core :as re-frame] [re-frame.core :as re-frame]
[status-im.utils.types :as types]
[status-im2.config :as config] [status-im2.config :as config]
[taoensso.timbre :as log] [taoensso.timbre :as log]
[utils.re-frame :as rf] [utils.re-frame :as rf]))
[native-module.core :as native-module]
[status-im.utils.types :as types]))
(def logs-queue (atom #queue [])) (def logs-queue (atom #queue []))
(def max-log-entries 1000) (def max-log-entries 1000)
@ -28,6 +28,7 @@
:mobile-system? false :mobile-system? false
:log-level level :log-level level
:callback handle-error}] :callback handle-error}]
(log/merge-config! {:ns-whitelist ["*"]})
(if (string/blank? level) (if (string/blank? level)
(native-module/init-status-go-logging (merge logging-params {:log-level "WARN"})) (native-module/init-status-go-logging (merge logging-params {:log-level "WARN"}))
(do (do