ApiListener: Reorder logging in ApiTimerHandler()

This commit is contained in:
Yonas Habteab 2024-02-21 12:18:35 +01:00 committed by Alexander A. Klimov
parent b9b3e7a925
commit 96839d829b

View File

@ -1020,6 +1020,10 @@ void ApiListener::ApiTimerHandler()
maxTs = client->GetTimestamp(); maxTs = client->GetTimestamp();
} }
Log(LogNotice, "ApiListener")
<< "Setting log position for identity '" << endpoint->GetName() << "': "
<< Utility::FormatDateTime("%Y/%m/%d %H:%M:%S", ts);
for (const JsonRpcConnection::Ptr& client : endpoint->GetClients()) { for (const JsonRpcConnection::Ptr& client : endpoint->GetClients()) {
if (client->GetTimestamp() == maxTs) { if (client->GetTimestamp() == maxTs) {
try { try {
@ -1032,10 +1036,6 @@ void ApiListener::ApiTimerHandler()
client->Disconnect(); client->Disconnect();
} }
} }
Log(LogNotice, "ApiListener")
<< "Setting log position for identity '" << endpoint->GetName() << "': "
<< Utility::FormatDateTime("%Y/%m/%d %H:%M:%S", ts);
} }
} }