Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
warning/error log messages should not contain ANSI escape sequences #18917
Comments
|
|
Please follow the guide below
xinto all the boxes [ ] relevant to your issue (like this:[x])Make sure you are using the latest version: run
youtube-dl --versionand ensure your version is 2019.01.17. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.Before submitting an issue make sure you have:
What is the purpose of your issue?
Description of your issue, suggested solution and other information
I am developing a console application using urwid. When youtube_dl reports errors, even with
ignoreerrors=True, I'm getting output to the console, which interferes with the operation of my app.I see in the comments to #9281 that "
Loggercan be used to intercept errors though it will hook all the errors not only ExtractorError." Doing this does, in fact, get the errors passed to my application's log handler, but it does so with unsightly ANSI escape codes in it:My proposed solution would be to not add the WARNING/ERROR strings (and certainly not the color codes) if the user passes in their own
logger.