From 00300f5b2f1a1bb599e8a0be3f1218d4fb6f5c54 Mon Sep 17 00:00:00 2001 From: marcsello Date: Wed, 22 Apr 2020 03:41:35 +0200 Subject: [PATCH] If something expected happens than it should not be logged as ERROR --- communicator.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/communicator.py b/communicator.py index 33bcf2b..8c738da 100644 --- a/communicator.py +++ b/communicator.py @@ -57,7 +57,8 @@ class Communicator: LOGGER.info(f"List of currently available consumers: {json}") return json except Exception as e: - LOGGER.exception(e) + LOGGER.error("Could not query available consumer list!") + #LOGGER.exception(e) return [] def isconsumeravailable(self) -> bool: @@ -70,7 +71,7 @@ class Communicator: response = requests.get(f'http://{currentconsumer}/consumers', timeout=5) isavailable = response.status_code == 200 except Exception as e: - LOGGER.exception(e) + #LOGGER.exception(e) isavailable = False LOGGER.info(f"Current consumer availability: {isavailable}") return isavailable @@ -85,7 +86,7 @@ class Communicator: response = requests.get(f'http://{consumer}/consumers', timeout=5) isavailable = response.status_code == 200 except Exception as e: - LOGGER.exception(e) + #LOGGER.exception(e) isavailable = False LOGGER.info(f"Consumer {consumer} availability: {isavailable}") return isavailable