HelloZeroNet / HelloZeroNet/ZeroNet

[Android] Disable console logging if another logger is already hooked

オープン
#2,139 コメント 14 件 リアクション 1 件 担当者 0 名 GitHub で見る
bug
主要言語
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

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。