From 5e3284f0e6db7f61bee1ae3a94a1468171ef01b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Fri, 28 Nov 2025 14:13:45 +0100 Subject: [PATCH] [actions] add 'LoggerAdapter.traceback()' method (#8317) 8c62be343eb8a3b7e3bebdc7566b60c87e4e3666 --- gallery_dl/actions.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gallery_dl/actions.py b/gallery_dl/actions.py index 971c4d90..5d2f645c 100644 --- a/gallery_dl/actions.py +++ b/gallery_dl/actions.py @@ -148,6 +148,11 @@ class LoggerAdapter(): if cond(msg): action(args) + def traceback(self, exc): + if self.logger.isEnabledFor(logging.DEBUG): + self.logger._log( + logging.DEBUG, "", None, exc_info=exc, extra=self.extra) + def _level_to_int(level): try: