Skip to content

Commit 22a22f0

Browse files
committed
Instance: add the logger getter
This can be useful if some logger is set and you want to get access to it afterwards.
1 parent 722c546 commit 22a22f0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

generator/templates/override.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,11 @@ def log_handler(instance, log_level, ctx, fmt, va_list):
189189
self._log_handler = log_handler
190190
self.log_set(self._log_handler, None)
191191

192+
def get_logger(self):
193+
"""Return the logger attached to the libVLC Instance (None by default)
194+
"""
195+
return getattr(self, '_logger', None)
196+
192197
class Media:
193198
"""Create a new Media instance.
194199

0 commit comments

Comments
 (0)