HelloZeroNet / HelloZeroNet/ZeroNet
[Android] Disable console logging if another logger is already hooked
- 主要語言
- JavaScript
- 星號
- 18.8k
- 分支
- 2.3k
- PR 合併指標
- 30 天內沒有已合併 PR
描述
### Step 1: Please describe your environment
* ZeroNet version: 4163
* Operating system: Android 9 / LOS 16
* Web browser: Firefox Klar Android
* Tor status: not available
* Opened port: no
* Special configuration: android
### Step 2: Describe the problem:
#### Steps to reproduce:
1. Launch the zeronet android app (python3 branch) without the patch
2. Watch it crash in the logs
#### Observed Results:
* The log keeps spamming, as the kivy logger repeats the zeronet logger which then repeats the kivy logger, causing a log overflow
#### Expected Results:
* It should detect this other logger and don't register it's own
#### Current workarround:
I'm applying this patch:
```patch
diff --git a/src/main.py b/src/main.py
index dfc32cc9..9f21ef2c 100644
--- a/src/main.py
+++ b/src/main.py
@@ -52,7 +52,7 @@ if config.action == "main":
print("Error starting browser: %s" % err)
sys.exit()
-config.initLogging()
+config.initLogging(console_logging=False)
# Debug dependent configuration
```
Instead this variable could be dynamically set, based on whether or not another logger is registered
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
從 src/main.py 開始,追蹤 Android 應用程式啟動時使用的 config.initLogging() 進入點。使用 python3 分支重現當機,並檢查 Kivy 和 ZeroNet logger 的註冊方式。當偵測到現有的 logger 或停用主控台記錄,使遞迴記錄和日誌溢位不再發生時,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- android, python
- 領域
- mobile-dev
- Issue 類型
- 缺陷
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100