Merge pull request #8894 from Icinga/bugfix/icinga-db-redis-connection-logging-spam-8883

RedisConnection: log info messages only once
This commit is contained in:
Alexander Aleksandrovič Klimov 2021-07-21 18:00:24 +02:00 committed by GitHub
commit 2b04e0a754
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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<TcpConn>::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);