From da922ca157df073976651b9cd0e1b82fc379dedf Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Mon, 12 Jul 2021 17:30:12 +0200 Subject: [PATCH] RedisConnection: log info messages only once refs #8883 --- lib/icingadb/redisconnection.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/icingadb/redisconnection.cpp b/lib/icingadb/redisconnection.cpp index 7d2f564fd..ee1ede89d 100644 --- a/lib/icingadb/redisconnection.cpp +++ b/lib/icingadb/redisconnection.cpp @@ -245,7 +245,7 @@ void RedisConnection::Connect(asio::yield_context& yc) for (;;) { try { if (m_Path.IsEmpty()) { - Log(LogInformation, "IcingaDB") + Log(m_Parent ? LogNotice : LogInformation, "IcingaDB") << "Trying to connect to Redis server (async) on host '" << m_Host << ":" << m_Port << "'"; auto conn (Shared::Make(m_Strand.context())); @@ -262,7 +262,7 @@ void RedisConnection::Connect(asio::yield_context& yc) m_Connected.store(true); - Log(LogInformation, "IcingaDB", "Connected to Redis server"); + Log(m_Parent ? LogNotice : LogInformation, "IcingaDB", "Connected to Redis server"); if (m_ConnectedCallback) { m_ConnectedCallback(yc);