Skip to content

Conversation

@bastimeyer
Copy link
Member

Deprecation messages should consistently get logged as warnings, to make them distinguishable from regular log messages, and to make it clear that user interactions are required.

While changing the log message channel, I experimented with switching to the warnings module and emitting DeprecationWarnings via warnings.warn() instead, but that would require capturing warnings in Streamlink's root logger, default warning filters would need to be changed (which I'm not sure how it would affect third party code), and in order to show warnings in a meaningful way for end-users, the resulting LogRecords would need to get changed as well. This is not worth the effort for using the deprecation warnings API of the stdlib.

@gravyboat gravyboat merged commit f020259 into streamlink:master Aug 30, 2022
@bastimeyer bastimeyer deleted the logger/deprecation-warnings branch August 30, 2022 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants