Increase logging level of errors while doing jobs (#4429)

This commit is contained in:
Paulus Schoutsen 2016-11-16 23:01:14 -08:00 committed by GitHub
parent c8bc1e3c5d
commit 38d201a54a

View file

@ -306,21 +306,14 @@ class HomeAssistant(object):
@callback @callback
def _async_exception_handler(self, loop, context): def _async_exception_handler(self, loop, context):
"""Handle all exception inside the core loop.""" """Handle all exception inside the core loop."""
message = context.get('message') kwargs = {}
if message:
_LOGGER.warning(
"Error inside async loop: %s",
message
)
# for debug modus
exception = context.get('exception') exception = context.get('exception')
if exception is not None: if exception:
exc_info = (type(exception), exception, exception.__traceback__) kwargs['exc_info'] = (type(exception), exception,
_LOGGER.debug( exception.__traceback__)
"Exception inside async loop: ",
exc_info=exc_info _LOGGER.error('Error doing job: %s', context['message'],
) **kwargs)
@callback @callback
def _async_stop_handler(self, *args): def _async_stop_handler(self, *args):