Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[WF] get_new_app_events logs with mylog("none", ...) — prints every 5 s regardless of LOG_LEVEL

オープン 初心者向け
#1,840 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

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

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
87/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
backend

調査の方向性

server/workflows/manager.py:82 のログ出力を読み、隣接する server/main.py:260 のログ出力と比較してください。LOG_LEVEL でイベントのない頻繁なポーリングを抑制できるよう、メッセージレベルを変更してください。その後、最小限のログ設定ではこの行が表示されず、デバッグログでは引き続き表示されることを確認してください。

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

説明

next release/in dev image 🚀
What installation are you running?

Production (netalertx) 📦 — ghcr.io/netalertx/netalertx:26.9.0

Is there an existing issue for this?
  • I have searched the existing open and closed issues and checked the docs
Current Behavior

The app log prints one line every ~5 seconds — about 17k lines/day:

01:24:49 [WF] get_new_app_events - new events count: 0
01:24:54 [WF] get_new_app_events - new events count: 0

This happens regardless of configuration: with LOG_LEVEL='minimal', and even after removing 'WORKFLOWS' from LOADED_PLUGINS (the call comes from the core main loop in server/__main__.py, not from the plugin).

Root cause

server/workflows/manager.py line 82 logs this message with level "none":

https://github.com/netalertx/NetAlertX/blob/49cd213164be1ad452b32e5df750c72f4a463c36/server/workflows/manager.py#L82

"none" is the lowest threshold in mylog, so the message prints at every LOG_LEVEL setting — effectively an unconditional print in the hot loop. The companion message two frames up, server/__main__.py line 260 ([MAIN] Processing WORKFLOW new_events from get_new_app_events), correctly uses "debug".

Expected Behavior

A periodic poll that almost always reports count: 0 should log at "debug" (or "trace"), consistent with the adjacent __main__.py call, and be silenceable via LOG_LEVEL.

Suggested fix

One-liner: change "none" to "debug" at server/workflows/manager.py:82. Happy to send a PR if that helps.

Context

Noticed while centralizing Docker container logs (journald → VictoriaLogs): this single line accounts for ~720 rows/h of the container's output with everything tuned down. Version 26.9.0 (digest 0ee5cdca…); the line is unchanged in main @ 49cd213.

主要言語
Python
スター
7.2k
フォーク
456
平均マージ
19時間 17分
マージ済み PR(30日)
26

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

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

netalertx/NetAlertX のほかの issue

netalertx/NetAlertX の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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