Skip to content

Instance: add a set_logger method#273

Open
garfvl wants to merge 7 commits intooaubert:masterfrom
garfvl:logging
Open

Instance: add a set_logger method#273
garfvl wants to merge 7 commits intooaubert:masterfrom
garfvl:logging

Conversation

@garfvl
Copy link
Copy Markdown
Contributor

@garfvl garfvl commented May 3, 2024

This MR adds a way to link libVLC log system to a python logging.Logger object.

A new set_logger method is added to the Instance class to link a logging.Logger to the libvlc_log_set callback setup.
The additional info from the log context (vlc module name, file, line, etc) are attached as extra info.
The log context test is modified to check the set_logger behavior (as the context info is included in the logger).

Tested on Linux and Windows, should work on macOS.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants