Always include warnings in debug output (#17059)

Authored by: bashonly
This commit is contained in:
bashonly 2026-06-26 18:04:05 -05:00 committed by GitHub
parent 4a6296248f
commit d23e6f5a38
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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):