[#10870] "Invalid timbre logging level" after upgrade from 1.4 to 1.4.1 or relogin on 1.4.1
Signed-off-by: andrey <motor4ik@gmail.com>
This commit is contained in:
parent
1733d4dc83
commit
056dde0190
3
.env
3
.env
|
@ -8,8 +8,7 @@ EXTENSIONS=0
|
|||
FLEET=eth.prod
|
||||
GROUP_CHATS_ENABLED=1
|
||||
HARDWALLET_ENABLED=1
|
||||
LOG_LEVEL_STATUS_GO=info
|
||||
LOG_LEVEL=debug
|
||||
LOG_LEVEL=info
|
||||
MAILSERVER_CONFIRMATIONS_ENABLED=1
|
||||
PFS_ENCRYPTION_ENABLED=1
|
||||
PFS_TOGGLE_VISIBLE=1
|
||||
|
|
3
.env.e2e
3
.env.e2e
|
@ -6,8 +6,7 @@ EXTENSIONS=0
|
|||
FLEET=eth.prod
|
||||
GROUP_CHATS_ENABLED=1
|
||||
HARDWALLET_ENABLED=1
|
||||
LOG_LEVEL_STATUS_GO=info
|
||||
LOG_LEVEL=debug
|
||||
LOG_LEVEL=info
|
||||
MAILSERVER_CONFIRMATIONS_ENABLED=0
|
||||
PAIRING_POPUP_DISABLED=1
|
||||
PFS_ENCRYPTION_ENABLED=1
|
||||
|
|
|
@ -7,8 +7,7 @@ EXTENSIONS=0
|
|||
FLEET=eth.prod
|
||||
GROUP_CHATS_ENABLED=1
|
||||
HARDWALLET_ENABLED=1
|
||||
LOG_LEVEL_STATUS_GO=info
|
||||
LOG_LEVEL=debug
|
||||
LOG_LEVEL=info
|
||||
MAILSERVER_CONFIRMATIONS_ENABLED=1
|
||||
MAINNET_WARNING_ENABLED=1
|
||||
PFS_ENCRYPTION_ENABLED=1
|
||||
|
|
|
@ -5,8 +5,7 @@ ETHEREUM_DEV_CLUSTER=1
|
|||
EXTENSIONS=0
|
||||
FLEET=eth.prod
|
||||
GROUP_CHATS_ENABLED=1
|
||||
LOG_LEVEL_STATUS_GO=info
|
||||
LOG_LEVEL=debug
|
||||
LOG_LEVEL=info
|
||||
MAILSERVER_CONFIRMATIONS_ENABLED=1
|
||||
MAINNET_WARNING_ENABLED=1
|
||||
PFS_ENCRYPTION_ENABLED=1
|
||||
|
|
|
@ -5,8 +5,7 @@ ETHEREUM_DEV_CLUSTER=0
|
|||
EXTENSIONS=0
|
||||
FLEET=eth.prod
|
||||
GROUP_CHATS_ENABLED=1
|
||||
LOG_LEVEL_STATUS_GO=
|
||||
LOG_LEVEL=info
|
||||
LOG_LEVEL=
|
||||
MAILSERVER_CONFIRMATIONS_ENABLED=1
|
||||
MAINNET_WARNING_ENABLED=1
|
||||
PFS_ENCRYPTION_ENABLED=1
|
||||
|
|
|
@ -108,7 +108,7 @@
|
|||
:currency :usd
|
||||
:appearance 0
|
||||
:waku-enabled true
|
||||
:log-level config/log-level-status-go})
|
||||
:log-level config/log-level})
|
||||
|
||||
(defn default-visible-tokens [chain]
|
||||
(get-in default-multiaccount [:wallet/visible-tokens chain]))
|
||||
|
|
|
@ -17,7 +17,8 @@
|
|||
[status-im.utils.error-handler :as error-handler]
|
||||
[status-im.utils.logging.core :as utils.logs]
|
||||
[status-im.utils.platform :as platform]
|
||||
[status-im.utils.snoopy :as snoopy]))
|
||||
[status-im.utils.snoopy :as snoopy]
|
||||
[status-im.utils.config :as config]))
|
||||
|
||||
(set! interop/next-tick js/setTimeout)
|
||||
(set! batching/fake-raf #(js/setTimeout % 0))
|
||||
|
@ -79,7 +80,7 @@
|
|||
:reagent-render views/main}))
|
||||
|
||||
(defn init []
|
||||
(utils.logs/init-logs)
|
||||
(utils.logs/init-logs config/log-level)
|
||||
(error-handler/register-exception-handler!)
|
||||
(enableScreens)
|
||||
(re-frame/dispatch-sync [:init/app-started])
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
[status-im.ui.components.react :as react]
|
||||
[status-im.utils.snoopy :as snoopy]
|
||||
[status-im.utils.error-handler :as error-handler]
|
||||
[status-im.utils.logging.core :as utils.logs]
|
||||
[status-im.ui.screens.desktop.views :as desktop-views]
|
||||
[status-im.desktop.deep-links :as deep-links]
|
||||
[status-im.utils.config :as config]))
|
||||
|
@ -39,7 +38,6 @@
|
|||
desktop-views/main)})))
|
||||
|
||||
(defn init []
|
||||
(utils.logs/init-logs)
|
||||
(error-handler/register-exception-handler!)
|
||||
(re-frame/dispatch-sync [:init/app-started])
|
||||
(.registerComponent ^js app-registry "StatusIm" #(reagent/reactify-component app-root))
|
||||
|
|
|
@ -195,7 +195,7 @@
|
|||
(contact/initialize-contacts)
|
||||
(stickers/init-stickers-packs)
|
||||
(mobile-network/on-network-status-change)
|
||||
(logging/set-log-level multiaccount)
|
||||
(logging/set-log-level (:log-level multiaccount))
|
||||
(multiaccounts/switch-preview-privacy-mode-flag))))
|
||||
|
||||
(defn get-new-auth-method [auth-method save-password?]
|
||||
|
@ -256,7 +256,7 @@
|
|||
:mailserver-topics {}
|
||||
:default-mailserver true})
|
||||
(multiaccounts/switch-preview-privacy-mode-flag)
|
||||
(logging/set-log-level multiaccount)
|
||||
(logging/set-log-level (:log-level multiaccount))
|
||||
(when-not platform/desktop?
|
||||
(initialize-wallet accounts nil)))))
|
||||
|
||||
|
|
|
@ -44,12 +44,7 @@
|
|||
|
||||
;; CONFIG VALUES
|
||||
(def log-level
|
||||
(-> (get-config :LOG_LEVEL "error")
|
||||
string/lower-case
|
||||
keyword))
|
||||
(def log-level-status-go
|
||||
(-> (get-config :LOG_LEVEL_STATUS_GO "")
|
||||
string/upper-case))
|
||||
(string/upper-case (get-config :LOG_LEVEL "")))
|
||||
(def fleet (get-config :FLEET "eth.staging"))
|
||||
(def default-network (get-config :DEFAULT_NETWORK))
|
||||
(def pow-target (js/parseFloat (get-config :POW_TARGET "0.0001")))
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
(ns status-im.utils.logging.core
|
||||
(:require [clojure.string :as clojure.string]
|
||||
[re-frame.core :as re-frame]
|
||||
(:require [re-frame.core :as re-frame]
|
||||
[status-im.native-module.core :as status]
|
||||
[status-im.utils.fx :as fx]
|
||||
[status-im.utils.types :as types]
|
||||
[status-im.utils.handlers :as handlers]
|
||||
[status-im.utils.email :as mail]
|
||||
[taoensso.timbre :as log]
|
||||
[status-im.utils.config :as config]
|
||||
[status-im.i18n :as i18n]
|
||||
[status-im.utils.platform :as platform]
|
||||
[status-im.utils.build :as build]
|
||||
[status-im.transport.utils :as transport.utils]
|
||||
[status-im.utils.datetime :as datetime]))
|
||||
[status-im.utils.datetime :as datetime]
|
||||
[clojure.string :as string]
|
||||
[status-im.utils.config :as config]))
|
||||
|
||||
(def report-email "error-reports@status.im")
|
||||
(def max-log-entries 1000)
|
||||
|
@ -22,17 +22,19 @@
|
|||
(when (>= (count @logs-queue) max-log-entries)
|
||||
(swap! logs-queue pop)))
|
||||
|
||||
(defn init-logs []
|
||||
(log/set-level! config/log-level)
|
||||
(log/debug)
|
||||
(log/merge-config!
|
||||
{:output-fn (fn [& data]
|
||||
(let [res (apply log/default-output-fn data)]
|
||||
(add-log-entry res)
|
||||
res))}))
|
||||
(defn init-logs [level]
|
||||
(when-not (string/blank? level)
|
||||
(log/set-level! (-> level
|
||||
string/lower-case
|
||||
keyword))
|
||||
(log/merge-config!
|
||||
{:output-fn (fn [& data]
|
||||
(let [res (apply log/default-output-fn data)]
|
||||
(add-log-entry res)
|
||||
res))})))
|
||||
|
||||
(defn get-js-logs []
|
||||
(clojure.string/join "\n" @logs-queue))
|
||||
(string/join "\n" @logs-queue))
|
||||
|
||||
(re-frame/reg-fx
|
||||
:logs/archive-logs
|
||||
|
@ -44,18 +46,14 @@
|
|||
|
||||
(re-frame/reg-fx
|
||||
:logs/set-level
|
||||
(fn [log-level]
|
||||
(log/set-level! log-level)))
|
||||
(fn [level]
|
||||
(init-logs level)))
|
||||
|
||||
(fx/defn set-log-level
|
||||
[{:keys [db]} multiaccount]
|
||||
(let [log-level (if-let [level (get multiaccount :log-level)]
|
||||
(if (clojure.string/blank? level) "ERROR" level)
|
||||
config/log-level-status-go)]
|
||||
{:db (assoc-in db [:multiaccount :log-level] log-level)
|
||||
:logs/set-level (-> log-level
|
||||
clojure.string/lower-case
|
||||
keyword)}))
|
||||
[{:keys [db]} log-level]
|
||||
(let [log-level (or log-level config/log-level)]
|
||||
{:db (assoc-in db [:multiaccount :log-level] log-level)
|
||||
:logs/set-level log-level}))
|
||||
|
||||
(fx/defn send-logs
|
||||
[{:keys [db]}]
|
||||
|
@ -112,10 +110,10 @@
|
|||
:node-info :peers-summary]}]
|
||||
(let [build-number (if platform/desktop? build/version build/build-no)
|
||||
build-version (str build/version " (" build-number ")")
|
||||
separator (clojure.string/join (take 40 (repeat "-")))
|
||||
separator (string/join (take 40 (repeat "-")))
|
||||
[enode-id ip-address port]
|
||||
(transport.utils/extract-url-components (:enode node-info))]
|
||||
(clojure.string/join
|
||||
(string/join
|
||||
"\n"
|
||||
(concat [(i18n/label :t/report-bug-email-template)]
|
||||
[separator
|
||||
|
|
Loading…
Reference in New Issue