From 38d201a54a70a9a55e1350e93c03a3f115b29079 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Wed, 16 Nov 2016 23:01:14 -0800 Subject: [PATCH] Increase logging level of errors while doing jobs (#4429) --- homeassistant/core.py | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/homeassistant/core.py b/homeassistant/core.py index 90f998508d8..86ce64a2120 100644 --- a/homeassistant/core.py +++ b/homeassistant/core.py @@ -306,21 +306,14 @@ class HomeAssistant(object): @callback def _async_exception_handler(self, loop, context): """Handle all exception inside the core loop.""" - message = context.get('message') - if message: - _LOGGER.warning( - "Error inside async loop: %s", - message - ) - - # for debug modus + kwargs = {} exception = context.get('exception') - if exception is not None: - exc_info = (type(exception), exception, exception.__traceback__) - _LOGGER.debug( - "Exception inside async loop: ", - exc_info=exc_info - ) + if exception: + kwargs['exc_info'] = (type(exception), exception, + exception.__traceback__) + + _LOGGER.error('Error doing job: %s', context['message'], + **kwargs) @callback def _async_stop_handler(self, *args):