Skip to content

Commit

Permalink
Remove stack trace from debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewsayre committed Apr 28, 2019
1 parent 1563d18 commit b812b4f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
7 changes: 3 additions & 4 deletions pyheos/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ async def _handle_connection_error(self, error: Exception):
else:
self._state = const.STATE_DISCONNECTED

_LOGGER.debug("Disconnected from %s", self.host, exc_info=error)
_LOGGER.debug("Disconnected from %s: %s", self.host, error)
self._heos.dispatcher.send(
const.SIGNAL_HEOS_EVENT, const.EVENT_DISCONNECTED)

Expand All @@ -164,10 +164,9 @@ async def _reconnect(self):
await self._connect()
self._reconnect_task = None
return
except (ConnectionError, asyncio.TimeoutError):
except (ConnectionError, asyncio.TimeoutError) as err:
# Occurs when we could not reconnect
_LOGGER.debug("Failed to reconnect to %s", self.host,
exc_info=True)
_LOGGER.debug("Failed to reconnect to %s: %s", self.host, err)
await self._disconnect()
await asyncio.sleep(self._reconnect_delay)
except asyncio.CancelledError:
Expand Down
3 changes: 0 additions & 3 deletions pyheos/heos.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Define the heos manager module."""
import asyncio
import logging
from typing import Dict, Optional, Sequence

from . import const
Expand All @@ -12,8 +11,6 @@
from .response import HeosResponse
from .source import HeosSource, InputSource

_LOGGER = logging.getLogger(__name__)


class Heos:
"""The Heos class provides access to the CLI API."""
Expand Down

0 comments on commit b812b4f

Please sign in to comment.