Always print masterserver response request id (#633)

Always print masterserver response request id to logs
This commit is contained in:
GeckoEidechse 2024-01-21 00:13:08 +01:00 committed by GitHub
parent 447cace77f
commit c7edf9bf74
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 0 deletions

View File

@ -1285,6 +1285,16 @@ void MasterServerPresenceReporter::InternalAddServer(const ServerPresence* pServ
return ReturnCleanup(MasterServerReportPresenceResult::FailedNoRetry);
}
// Log request id for easier debugging when combining with logs on masterserver
if (serverAddedJson.HasMember("id"))
{
spdlog::info("Request id: {}", serverAddedJson["id"].GetString());
}
else
{
spdlog::error("Couldn't find request id in response");
}
if (serverAddedJson.HasMember("error"))
{
if (shouldLogError)