Overly verbose logging to journalctl

オープン
#17 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
python
領域
backend

調査の方向性

update-manager のトランザクションを再現し、journalctl にある重複した AptKit エントリと org.aptkit エントリを比較します。両方のエントリを生成している logging 設定を追跡し、/usr/lib/python3/dist-packages/aptkit/progress.py:485 にある警告箇所を調べます。関連のないサービスの logging を変更せずに、重複した aptkit メッセージを削除または制御できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

So when I run the update manager, I get this in my journalctl:

Apr 21 13:59:14 Excalibur dbus-daemon[1618]: [system] Activating service name='org.aptkit' requested by ':1.4514' (uid=1000 pid=7195 comm="mintUpdate " label="unconfined") (usi>
Apr 21 13:59:14 Excalibur AptKit[278078]: INFO: Initializing daemon
Apr 21 13:59:14 Excalibur org.aptkit[278078]: 13:59:14 AptKit [INFO]: Initializing daemon
Apr 21 13:59:14 Excalibur dbus-daemon[1618]: [system] Successfully activated service 'org.aptkit'
Apr 21 13:59:14 Excalibur AptKit[278078]: INFO: InstallPackages() was called: dbus.Array([dbus.String('libcap2-bin'), dbus.String('libcap2:i386'), dbus.String('libcap2'), dbus.String('libpam-cap'), dbus.String('ntf>
Apr 21 13:59:14 Excalibur org.aptkit[278078]: 13:59:14 AptKit [INFO]: InstallPackages() was called: dbus.Array([dbus.String('libcap2-bin'), dbus.String('libcap2:i386'), dbus.String('libcap2'), dbus.String('libpam-c>
Apr 21 13:59:14 Excalibur AptKit.Trans[278078]: INFO: Simulate was called
Apr 21 13:59:14 Excalibur org.aptkit[278078]: 13:59:14 AptKit.Trans [INFO]: Simulate was called
Apr 21 13:59:14 Excalibur AptKit.Worker[278078]: INFO: Simulating trans: /org/aptkit/transaction/67229b042b6e48bb80ba8b577b86bd14
Apr 21 13:59:14 Excalibur org.aptkit[278078]: 13:59:14 AptKit.Worker [INFO]: Simulating trans: /org/aptkit/transaction/67229b042b6e48bb80ba8b577b86bd14
Apr 21 13:59:14 Excalibur AptKit.Worker[278078]: WARNING: An additional step to open the cache is required
Apr 21 13:59:14 Excalibur org.aptkit[278078]: 13:59:14 AptKit.Worker [WARNING]: An additional step to open the cache is required
Apr 21 13:59:14 Excalibur AptKit.Worker[278078]: INFO: Committing packages: dbus.Array([dbus.String('libcap2-bin'), dbus.String('libcap2:i386'), dbus.String('libcap2'), dbus.String('libpam-cap'), dbus.String('ntfs->
Apr 21 13:59:14 Excalibur org.aptkit[278078]: 13:59:14 AptKit.Worker [INFO]: Committing packages: dbus.Array([dbus.String('libcap2-bin'), dbus.String('libcap2:i386'), dbus.String('libcap2'), dbus.String('libpam-cap>
Apr 21 13:59:14 Excalibur AptKit.Trans[278078]: INFO: Queuing transaction /org/aptkit/transaction/67229b042b6e48bb80ba8b577b86bd14
Apr 21 13:59:14 Excalibur org.aptkit[278078]: 13:59:14 AptKit.Trans [INFO]: Queuing transaction /org/aptkit/transaction/67229b042b6e48bb80ba8b577b86bd14
Apr 21 13:59:19 Excalibur polkitd[1730]: Operator of unix-session:c2 successfully authenticated as unix-user:qwinn to gain TEMPORARY authorization for action org.aptkit.install-or-remove-packages for system-bus-nam>
Apr 21 13:59:19 Excalibur AptKit.Worker[278078]: INFO: Processing transaction /org/aptkit/transaction/67229b042b6e48bb80ba8b577b86bd14
Apr 21 13:59:19 Excalibur org.aptkit[278078]: 13:59:19 AptKit.Worker [INFO]: Processing transaction /org/aptkit/transaction/67229b042b6e48bb80ba8b577b86bd14
Apr 21 13:59:20 Excalibur systemd[6483]: Started pk-debconf-helper.service - debconf communication service.
Apr 21 13:59:27 Excalibur dbus-daemon[1618]: [system] Activating via systemd: service name='org.freedesktop.PackageKit' unit='packagekit.service' requested by ':1.4520' (uid=0 pid=282881 comm="/usr/bin/gdbus call ->
Apr 21 13:59:27 Excalibur dbus-daemon[1618]: [system] Successfully activated service 'org.freedesktop.PackageKit'
Apr 21 13:59:27 Excalibur org.aptkit[278078]: /usr/lib/python3/dist-packages/aptkit/progress.py:485: Warning: Source ID 34 was not found when attempting to remove it
Apr 21 13:59:27 Excalibur org.aptkit[278078]: GLib.source_remove(id)
Apr 21 13:59:27 Excalibur org.aptkit[278078]: /usr/lib/python3/dist-packages/aptkit/progress.py:485: Warning: Source ID 35 was not found when attempting to remove it
Apr 21 13:59:27 Excalibur org.aptkit[278078]: GLib.source_remove(id)
Apr 21 13:59:27 Excalibur AptKit.Worker[278078]: INFO: Finished transaction /org/aptkit/transaction/67229b042b6e48bb80ba8b577b86bd14
Apr 21 13:59:27 Excalibur org.aptkit[278078]: 13:59:27 AptKit.Worker [INFO]: Finished transaction /org/aptkit/transaction/67229b042b6e48bb80ba8b577b86bd14

Is all this really necessary? For one thing I note that most lines seem to be duplicated, one from org.aptkit and another from either AptKit.Worker or AptKit.Trans. According to AI (which of course could be wrong but if that's the case I'm not sure how I'd go about finding the right answer), the only way to control all this logging to journalctl would be to add a LogLevelMax=error to the org.freedesktop.PolicyKit1 service, which would suppress INFO and WARNING messages for a whole lot of services, not just aptkit. So unless you guys can tone this down somehow or add a configuration option to control it, there's no way a user can control this level of verbosity.

If at least the duplication could be removed, that would help a lot. Preferably removing the ones from org.AptKit as those come up yellow in journalctl even when they are INFO level, the AptKit.Worker/Trans obey normal coloring conventions. Thanks for any help.

主要言語
Python
スター
15
フォーク
10
PR マージ指標
30日以内にマージされた PR はありません

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

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

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

linuxmint/aptkit のほかの issue

linuxmint/aptkit の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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