From f7d2e4f0db258f34e8bd340ade6aaf6814bdc0a5 Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Fri, 18 Apr 2025 09:40:08 -0500 Subject: [PATCH 1/3] Improve error message for error opening GELF endpoint. --- libraries/libfc/src/log/gelf_appender.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/libfc/src/log/gelf_appender.cpp b/libraries/libfc/src/log/gelf_appender.cpp index 20b8e7b63d..ab8cb84837 100644 --- a/libraries/libfc/src/log/gelf_appender.cpp +++ b/libraries/libfc/src/log/gelf_appender.cpp @@ -147,6 +147,10 @@ namespace fc }); } + catch (std::exception& ex) + { + std::cerr << "error opening GELF socket to endpoint " << my->cfg.endpoint << ", " << ex.what() << "\n"; + } catch (...) { std::cerr << "error opening GELF socket to endpoint " << my->cfg.endpoint << "\n"; From cf34b7c5b99a8c811884e657fce97e23b9f322b2 Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Fri, 18 Apr 2025 09:41:10 -0500 Subject: [PATCH 2/3] Change example to an endpoint that doesn't resolve to prevent use of example logging.json creating a GELF thread that keeps sending. --- programs/nodeos/logging.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/nodeos/logging.json b/programs/nodeos/logging.json index 42707b376f..15f8b96165 100644 --- a/programs/nodeos/logging.json +++ b/programs/nodeos/logging.json @@ -43,7 +43,7 @@ "name": "net", "type": "gelf", "args": { - "endpoint": "10.10.10.10:12201", + "endpoint": "my_server.example.com:12201", "host": "host_name", "_network": "jungle" }, From 8b6e17c02d786baf79d28da59072da3a56e17807 Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Fri, 18 Apr 2025 10:02:19 -0500 Subject: [PATCH 3/3] Use .invalid which is defined to not be valid --- programs/nodeos/logging.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/nodeos/logging.json b/programs/nodeos/logging.json index 15f8b96165..79bfde90c6 100644 --- a/programs/nodeos/logging.json +++ b/programs/nodeos/logging.json @@ -43,7 +43,7 @@ "name": "net", "type": "gelf", "args": { - "endpoint": "my_server.example.com:12201", + "endpoint": "my_server.example.invalid:12201", "host": "host_name", "_network": "jungle" },