refactor(camera): logging
This commit is contained in:
1 parent
9fb17ee17f
commit
87e18ed6d4
1 file changed
+4
-2
+4
-2
@@ -96,11 +96,13 @@ class Panel(ScreenPanel):
|
||||
self._screen._menu_go_back()
|
||||
|
||||
def log(self, loglevel, component, message):
|
||||
logging.debug(f'[{loglevel}] {component}: {message}')
|
||||
if 'unable to decode' in message: # skip proprietary app fields errors
|
||||
return
|
||||
if (
|
||||
loglevel == 'error'
|
||||
and 'unable to decode' not in message # skip proprietary app fields errors
|
||||
and 'No Xvideo support found' not in message # will fall back automatically
|
||||
and 'youtube-dl' not in message # needed for some streams, not relevant for our case
|
||||
):
|
||||
self._screen.show_popup_message(f'{message}')
|
||||
else:
|
||||
logging.debug(f'[{loglevel}] {component}: {message}')
|
||||
Reference in new issue
Block a user