diff --git a/dDatabase/MigrationRunner.cpp b/dDatabase/MigrationRunner.cpp index 186368fd..a988acac 100644 --- a/dDatabase/MigrationRunner.cpp +++ b/dDatabase/MigrationRunner.cpp @@ -31,7 +31,7 @@ void MigrationRunner::RunMigrations() { delete stmt; if (doExit) continue; - Game::logger->Log("MigrationRunner", "Running migration: " + migration.name + ""); + Game::logger->Log("MigrationRunner", "Running migration: %s", migration.name.c_str()); finalSQL.append(migration.data); finalSQL.append('\n'); @@ -49,7 +49,7 @@ void MigrationRunner::RunMigrations() { delete simpleStatement; } catch (sql::SQLException e) { - Game::logger->Log("MigrationRunner", std::string("Encountered error running migration: ") + e.what() + ""); + Game::logger->Log("MigrationRunner", "Encountered error running migration: %s", e.what()); } } } diff --git a/dGame/dGameMessages/GameMessages.cpp b/dGame/dGameMessages/GameMessages.cpp index 365485f2..66d71ca1 100644 --- a/dGame/dGameMessages/GameMessages.cpp +++ b/dGame/dGameMessages/GameMessages.cpp @@ -2408,7 +2408,7 @@ void GameMessages::HandleBBBLoadItemRequest(RakNet::BitStream* inStream, Entity* LWOOBJID itemID = LWOOBJID_EMPTY; inStream->Read(itemID); - Game::logger->Log("BBB", "Load item request for: " + std::to_string(itemID) + ""); + Game::logger->Log("BBB", "Load item request for: %lld", itemID); CBITSTREAM; PacketUtils::WriteHeader(bitStream, CLIENT, MSG_CLIENT_BLUEPRINT_LOAD_RESPONSE_ITEMID); @@ -3848,7 +3848,7 @@ void GameMessages::HandleMessageBoxResponse(RakNet::BitStream* inStream, Entity* userData.push_back(character); } - Game::logger->Log("HandleMessageBoxResponse", "Button: " + std::to_string(iButton) + "; LOT: " + std::to_string(entity->GetLOT()) + " identifier: " + GeneralUtils::UTF16ToWTF8(identifier) + "; userData: " + GeneralUtils::UTF16ToWTF8(userData)); + Game::logger->Log("HandleMessageBoxResponse", "Button: %d; LOT: %u identifier: %s; userData: %s", iButton, entity->GetLOT(), GeneralUtils::UTF16ToWTF8(identifier).c_str(), GeneralUtils::UTF16ToWTF8(userData).c_str()); auto* user = UserManager::Instance()->GetUser(sysAddr); @@ -3912,7 +3912,7 @@ void GameMessages::HandleChoiceBoxRespond(RakNet::BitStream* inStream, Entity* e identifier.push_back(character); } - Game::logger->Log("HandleChoiceBoxRespond", "Button: " + std::to_string(iButton) + "; LOT: " + std::to_string(entity->GetLOT()) + " buttonIdentifier: " + GeneralUtils::UTF16ToWTF8(buttonIdentifier) + "; userData: " + GeneralUtils::UTF16ToWTF8(identifier)); + Game::logger->Log("HandleChoiceBoxRespond", "Button: %d; LOT: %u buttonIdentifier: %s; userData: %s", iButton, entity->GetLOT(), GeneralUtils::UTF16ToWTF8(buttonIdentifier).c_str(), GeneralUtils::UTF16ToWTF8(identifier).c_str()); auto* user = UserManager::Instance()->GetUser(sysAddr); diff --git a/dScripts/CppScripts.cpp b/dScripts/CppScripts.cpp index 8feb8ae7..8569bf9e 100644 --- a/dScripts/CppScripts.cpp +++ b/dScripts/CppScripts.cpp @@ -818,7 +818,7 @@ CppScripts::Script* CppScripts::GetScript(Entity* parent, const std::string& scr script = invalidToReturn; else if (script == invalidToReturn) { if (scriptName.length() > 0) - Game::logger->LogDebug("CppScripts", "Attempted to load CppScript for '" + scriptName + "', but returned InvalidScript."); + Game::logger->LogDebug("CppScripts", "Attempted to load CppScript for '%s', but returned InvalidScript.", scriptName.c_str()); // information not really needed for sys admins but is for developers script = invalidToReturn; diff --git a/dWorldServer/WorldServer.cpp b/dWorldServer/WorldServer.cpp index 084b465a..6d85b2cd 100644 --- a/dWorldServer/WorldServer.cpp +++ b/dWorldServer/WorldServer.cpp @@ -1064,7 +1064,7 @@ void HandlePacket(Packet* packet) { stmt->setUInt64(1, propertyId); auto res = stmt->executeQuery(); while (res->next()) { - Game::logger->Log("UGC", "Getting lxfml ugcID: " + std::to_string(res->getUInt(1))); + Game::logger->Log("UGC", "Getting lxfml ugcID: %u", res->getUInt(1)); //Get lxfml: auto stmtL = Database::CreatePreppedStmt("SELECT lxfml from ugc where id=?"); @@ -1321,4 +1321,4 @@ void SendShutdownMessageToMaster() { CBITSTREAM; PacketUtils::WriteHeader(bitStream, MASTER, MSG_MASTER_SHUTDOWN_RESPONSE); Game::server->SendToMaster(&bitStream); -} \ No newline at end of file +}