From 301ba693aac7977bde8e5578616e46ae1a65b85c Mon Sep 17 00:00:00 2001 From: ffont Date: Mon, 20 Jan 2025 14:30:42 +0100 Subject: [PATCH] Change gelf handler protocol Even though similarity and tag rec can't log to graylog anymore... --- similarity/similarity_indexing_server.py | 2 +- similarity/similarity_server.py | 2 +- tagrecommendation/tagrecommendation_server.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/similarity/similarity_indexing_server.py b/similarity/similarity_indexing_server.py index 3b17e68a1..c5e0e3bb7 100644 --- a/similarity/similarity_indexing_server.py +++ b/similarity/similarity_indexing_server.py @@ -95,7 +95,7 @@ def clear_memory(self, request): logger.addHandler(handler) std_handler.setFormatter(formatter) logger.addHandler(std_handler) - handler_gelf = pygelf.GelfHttpsHandler(sim_settings.LOGSERVER_HOST, sim_settings.LOGSERVER_PORT) + handler_gelf = pygelf.GelfUdpHandler(sim_settings.LOGSERVER_HOST, sim_settings.LOGSERVER_PORT) logger.addHandler(handler_gelf) # Start service diff --git a/similarity/similarity_server.py b/similarity/similarity_server.py index d4955a7d2..bd3b7c957 100644 --- a/similarity/similarity_server.py +++ b/similarity/similarity_server.py @@ -248,7 +248,7 @@ def save(self, request, filename=None): std_handler.setFormatter(formatter) logger.addHandler(std_handler) if LOG_TO_GRAYLOG: - handler_gelf = pygelf.GelfHttpsHandler(LOGSERVER_HOST, LOGSERVER_PORT) + handler_gelf = pygelf.GelfUdpHandler(LOGSERVER_HOST, LOGSERVER_PORT) logger.addHandler(handler_gelf) # Start service diff --git a/tagrecommendation/tagrecommendation_server.py b/tagrecommendation/tagrecommendation_server.py index 35e0d453a..b77dd19ad 100644 --- a/tagrecommendation/tagrecommendation_server.py +++ b/tagrecommendation/tagrecommendation_server.py @@ -172,7 +172,7 @@ def add_to_index(self, sound_ids, sound_tagss): std_handler.setFormatter(formatter) logger.addHandler(std_handler) if tr_settings.LOG_TO_GRAYLOG: - handler_gelf = pygelf.GelfHttpsHandler(tr_settings.LOGSERVER_HOST, tr_settings.LOGSERVER_PORT) + handler_gelf = pygelf.GelfUdpHandler(tr_settings.LOGSERVER_HOST, tr_settings.LOGSERVER_PORT) logger.addHandler(handler_gelf) # Start service