handle ping endpoint logging better

This commit is contained in:
arabcoders 2025-06-17 20:00:03 +03:00
parent 8694e82965
commit 0345da6468
2 changed files with 3 additions and 3 deletions

View file

@ -18,8 +18,6 @@ class Packages:
if file.exists() and os.access(str(file), os.R_OK):
with open(file) as f:
from_file: list[str] = [pkg.strip() for pkg in f if pkg.strip()]
else:
LOG.error(f"pip packages file '{file}' doesn't exist or is not readable.")
self.packages: list[str] = list(set(from_env + from_file))
self.upgrade = bool(upgrade)

View file

@ -129,7 +129,9 @@ class Main:
if self._config.access_log:
from app.library.HttpAPI import LOG as HTTP_LOGGER
HTTP_LOGGER.addFilter(lambda record: f"GET {self._app.router['ping'].url_for()}" not in record.getMessage())
HTTP_LOGGER.addFilter(
lambda record: f"GET {str(self._app.router['ping'].url_for()).rstrip('/')}" not in record.getMessage()
)
web.run_app(
self._app,