mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
DB IDO: Add a log message when the connection handling is completed
fixes #10857
This commit is contained in:
parent
c0da6cbb6a
commit
2b86039435
@ -167,6 +167,7 @@ void IdoMysqlConnection::Reconnect(void)
|
||||
|
||||
CONTEXT("Reconnecting to MySQL IDO database '" + GetName() + "'");
|
||||
|
||||
double startTime = Utility::GetTime();
|
||||
m_SessionToken = static_cast<int>(Utility::GetTime());
|
||||
|
||||
SetShouldConnect(true);
|
||||
@ -386,6 +387,9 @@ void IdoMysqlConnection::Reconnect(void)
|
||||
ClearCustomVarTable("customvariables");
|
||||
ClearCustomVarTable("customvariablestatus");
|
||||
|
||||
Log(LogInformation, "IdoMysqlConnection")
|
||||
<< "Finished reconnecting to MySQL IDO database in " << std::setw(2) << Utility::GetTime() - startTime << " second(s).";
|
||||
|
||||
Query("COMMIT");
|
||||
Query("BEGIN");
|
||||
}
|
||||
|
@ -164,6 +164,7 @@ void IdoPgsqlConnection::Reconnect(void)
|
||||
|
||||
CONTEXT("Reconnecting to PostgreSQL IDO database '" + GetName() + "'");
|
||||
|
||||
double startTime = Utility::GetTime();
|
||||
m_SessionToken = static_cast<int>(Utility::GetTime());
|
||||
|
||||
SetShouldConnect(true);
|
||||
@ -376,6 +377,9 @@ void IdoPgsqlConnection::Reconnect(void)
|
||||
ClearCustomVarTable("customvariables");
|
||||
ClearCustomVarTable("customvariablestatus");
|
||||
|
||||
Log(LogInformation, "IdoPgsqlConnection")
|
||||
<< "Finished reconnecting to PostgreSQL IDO database in " << std::setw(2) << Utility::GetTime() - startTime << " second(s).";
|
||||
|
||||
Query("COMMIT");
|
||||
Query("BEGIN");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user