Skip to content

Bulk asynchronous downloader for multiple file hosts

fix: handle errors while formatting log messages (#1912)

NTFSvolume34026603d97e
diff --git a/cyberdrop_dl/logs.py b/cyberdrop_dl/logs.py
index eda70c136..0e926590d 100644
--- a/cyberdrop_dl/logs.py
+++ b/cyberdrop_dl/logs.py
@@ -161,6 +161,12 @@ class LogHandler(RichHandler):
return message_text
+ def emit(self, record: logging.LogRecord) -> None:
+ try:
+ return super().emit(record)
+ except Exception: # noqa: BLE001
+ self.handleError(record)
+
class BareQueueHandler(QueueHandler):
"""Sends the log record to the queue as is.