From d23e6f5a387d5933bc24e1eb5437da8fd563c1f0 Mon Sep 17 00:00:00 2001 From: bashonly <88596187+bashonly@users.noreply.github.com> Date: Fri, 26 Jun 2026 18:04:05 -0500 Subject: [PATCH] Always include warnings in debug output (#17059) Authored by: bashonly --- yt_dlp/YoutubeDL.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index 08c3404d64..4f74164751 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -1138,9 +1138,10 @@ class YoutubeDL: """ if self.params.get('logger') is not None: self.params['logger'].warning(message) + elif self.params.get('no_warnings'): + if self.params.get('verbose'): + self.to_stderr(f'[debug:warning] {message}', only_once=only_once) else: - if self.params.get('no_warnings'): - return self.to_stderr(f'{self._format_err("WARNING:", self.Styles.WARNING)} {message}', only_once) def deprecation_warning(self, message, *, stacklevel=0):