diff --git a/src/dls_mainiac_lib/mainiac.py b/src/dls_mainiac_lib/mainiac.py index 3397848..5542185 100644 --- a/src/dls_mainiac_lib/mainiac.py +++ b/src/dls_mainiac_lib/mainiac.py @@ -431,7 +431,8 @@ def configure_logging(self, settings=None): import graypy # Create and enable graylog handler - if graypy_settings.get("protocol", "UDP") == "UDP": + protocol = graypy_settings.get("protocol", "UDP") + if protocol == "UDP": graypy_handler_class = graypy.GELFUDPHandler else: graypy_handler_class = graypy.GELFTCPHandler @@ -446,6 +447,10 @@ def configure_logging(self, settings=None): graypy_handler.setLevel(logging.DEBUG) logging.getLogger().addHandler(graypy_handler) + logger.debug( + f"graypy logging handler enabled to {host}:{port} {protocol}" + ) + else: graypy_handler = None