Skip to content
Snippets Groups Projects
Commit 550f31d4 authored by Jeff Schroeder's avatar Jeff Schroeder
Browse files

Quiet down some of the logging in the sonos platform

This is due to the soco library logging very excessively and it using
requests to connect to each Sonos speaker every 10 seconds (by default).

This makes the logs much more pleasant to use for finding real issues.
parent 7e42b35b
No related branches found
No related tags found
No related merge requests found
......@@ -28,6 +28,14 @@ REQUIREMENTS = ['SoCo==0.11.1']
_LOGGER = logging.getLogger(__name__)
# The soco library is excessively chatty when it comes to logging and
# causes a LOT of spam in the logs due to making a http connection to each
# speaker every 10 seconds. Quiet it down a bit to just actual problems.
_SOCO_LOGGER = logging.getLogger('soco')
_SOCO_LOGGER.setLevel(logging.ERROR)
_REQUESTS_LOGGER = logging.getLogger('requests')
_REQUESTS_LOGGER.setLevel(logging.ERROR)
SUPPORT_SONOS = SUPPORT_PAUSE | SUPPORT_VOLUME_SET | SUPPORT_VOLUME_MUTE |\
SUPPORT_PREVIOUS_TRACK | SUPPORT_NEXT_TRACK | SUPPORT_SEEK
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment