[output] add 'Logger.traceback()' helper

This commit is contained in:
Mike Fährmann
2025-10-14 18:44:29 +02:00
parent 9d054ad18d
commit 8c62be343e
15 changed files with 33 additions and 27 deletions

View File

@@ -95,7 +95,7 @@ class HttpDownloader(DownloaderBase):
except Exception as exc:
if self.downloading:
output.stderr_write("\n")
self.log.debug("", exc_info=exc)
self.log.traceback(exc)
raise
finally:
# remove file from incomplete downloads

View File

@@ -49,7 +49,7 @@ class YoutubeDLDownloader(DownloaderBase):
except (ImportError, SyntaxError) as exc:
self.log.error("Cannot import module '%s'",
getattr(exc, "name", ""))
self.log.debug("", exc_info=exc)
self.log.traceback(exc)
self.download = lambda u, p: False
return False
@@ -91,7 +91,7 @@ class YoutubeDLDownloader(DownloaderBase):
else:
info_dict = self._extract_info(ytdl_instance, url)
except Exception as exc:
self.log.debug("", exc_info=exc)
self.log.traceback(exc)
self.log.warning("%s: %s", exc.__class__.__name__, exc)
if not info_dict:
@@ -164,7 +164,7 @@ class YoutubeDLDownloader(DownloaderBase):
try:
ytdl_instance.process_info(info_dict)
except Exception as exc:
self.log.debug("", exc_info=exc)
self.log.traceback(exc)
return False
pathfmt.temppath = info_dict.get("filepath") or info_dict["_filename"]
@@ -188,7 +188,7 @@ class YoutubeDLDownloader(DownloaderBase):
ytdl_instance.process_info(entry)
status = True
except Exception as exc:
self.log.debug("", exc_info=exc)
self.log.traceback(exc)
self.log.error("%s: %s", exc.__class__.__name__, exc)
return status