diff --git a/CHANGELOG.rst b/CHANGELOG.rst index e96926a..d3e0062 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -11,7 +11,7 @@ CHANGELOG ## Monitor ^^^^^^^^^^ -- Bot logs: fix log level filter "ALL" (PR#49 by Sebastian Wagner, fixes #48). +- Bot logs: Remove log level filter "ALL", use INFO as default (PR#51, PR#49 by Sebastian Wagner, fixes #48). Tests ^^^^^ @@ -22,7 +22,7 @@ Tests 3.3.0 (2024-03-01) ---------------------- -- Bump version number to be in sync with the main intelmq version +- Bump version number to be in sync with the main intelmq version - minor fixes to re-enable all the github workflows and disable the workflows which did not run anymore. 3.2.0 (2023-07-19) diff --git a/intelmq_api/api.py b/intelmq_api/api.py index e2fbd1f..d828823 100644 --- a/intelmq_api/api.py +++ b/intelmq_api/api.py @@ -79,7 +79,7 @@ def bot(action: Actions, id: str = Depends(ID), runner: runctl.RunIntelMQCtl = D @api.get("/api/getlog", dependencies=[authorized, cached]) -def get_log(lines: int, id: str = Depends(ID), level: Levels = "DEBUG", +def get_log(lines: int, id: str = Depends(ID), level: Levels = "INFO", runner: runctl.RunIntelMQCtl = Depends(runner)): return JSONFileResponse(runner.log(id, lines, level)) diff --git a/intelmq_api/runctl.py b/intelmq_api/runctl.py index 993c50f..fc3e454 100644 --- a/intelmq_api/runctl.py +++ b/intelmq_api/runctl.py @@ -112,8 +112,6 @@ def bot(self, action: str, bot_id: str) -> JSONFile: return self._run_json([action, bot_id]) def log(self, bot_id: str, lines: int, level: str) -> JSONFile: - if level == "ALL": - return self._run_json(["log", bot_id, str(lines)]) return self._run_json(["log", bot_id, str(lines), level]) def list(self, kind: str) -> JSONFile: