fix(logging): replace structlog with stdlib logging to prevent broken pipe crashes

structlog fails with BrokenPipeError when stdout is redirected (e.g., background
processes, Docker logs). Replace all structlog.get_logger() calls with
logging.getLogger() and convert keyword-style log calls to %-format strings.

Also removes stale Docs/tasks.md (2028 lines) and updates Robot Framework
tests to match current API behavior.
This commit is contained in:
2026-06-21 20:14:31 +02:00
parent be3e180137
commit 572aa0fc78
18 changed files with 299 additions and 2254 deletions

View File

@@ -731,9 +731,7 @@ class DownloadService:
# Delete from database
await self._delete_from_database(item_id)
removed_ids.append(item_id)
logger.info(
"Removed from pending queue", item_id=item_id
)
logger.info("Removed from pending queue item_id=%s", item_id)
if removed_ids:
# Notify via progress service
@@ -803,7 +801,7 @@ class DownloadService:
force_broadcast=True,
)
logger.info("Queue reordered", reordered_count=len(item_ids))
logger.info("Queue reordered reordered_count=%s", len(item_ids))
except Exception as e:
logger.error("Failed to reorder queue: %s", e)
@@ -1036,7 +1034,7 @@ class DownloadService:
"""
count = len(self._completed_items)
self._completed_items.clear()
logger.info("Cleared completed items", count=count)
logger.info("Cleared completed items count=%s", count)
# Notify via progress service
if count > 0:
@@ -1062,7 +1060,7 @@ class DownloadService:
"""
count = len(self._failed_items)
self._failed_items.clear()
logger.info("Cleared failed items", count=count)
logger.info("Cleared failed items count=%s", count)
# Notify via progress service
if count > 0:
@@ -1094,7 +1092,7 @@ class DownloadService:
self._pending_queue.clear()
self._pending_items_by_id.clear()
logger.info("Cleared pending items", count=count)
logger.info("Cleared pending items count=%s", count)
# Notify via progress service
if count > 0: