DB IDO: Add a log message when the connection handling is completed

fixes #10857
This commit is contained in:
Michael Friedrich 2015-12-15 16:50:17 +01:00
parent 5b48559d75
commit 1add333a57
2 changed files with 8 additions and 0 deletions

View File

@ -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");
}

View File

@ -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");
}