Skip to content

Commit

Permalink
add debug about graylog enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
David Erb committed Feb 8, 2023
1 parent 5f41de4 commit efbe97b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/dls_mainiac_lib/mainiac.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit efbe97b

Please sign in to comment.