mirror of https://github.com/Icinga/icinga2.git
DB IDO: Add a log message when the connection handling is completed
fixes #10857
This commit is contained in:
parent
5b48559d75
commit
1add333a57
|
@ -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…
Reference in New Issue