Make logger automatically put a newline (#675)

at the end of the line
remove all the newlines in log calls
This commit is contained in:
Aaron Kimbrell
2022-07-24 21:26:51 -05:00
committed by GitHub
parent a7fb6eb3f3
commit e97ae92624
86 changed files with 1249 additions and 1252 deletions

View File

@@ -37,7 +37,7 @@
void ClientPackets::HandleChatMessage(const SystemAddress& sysAddr, Packet* packet) {
User* user = UserManager::Instance()->GetUser(sysAddr);
if (!user) {
Game::logger->Log("ClientPackets", "Unable to get user to parse chat message\n");
Game::logger->Log("ClientPackets", "Unable to get user to parse chat message");
return;
}
@@ -71,14 +71,14 @@ void ClientPackets::HandleChatMessage(const SystemAddress& sysAddr, Packet* pack
if (!user->GetLastChatMessageApproved() && !isMythran) return;
std::string sMessage = GeneralUtils::UTF16ToWTF8(message);
Game::logger->Log("Chat", "%s: %s\n", playerName.c_str(), sMessage.c_str());
Game::logger->Log("Chat", "%s: %s", playerName.c_str(), sMessage.c_str());
ChatPackets::SendChatMessage(sysAddr, chatChannel, playerName, user->GetLoggedInChar(), isMythran, message);
}
void ClientPackets::HandleClientPositionUpdate(const SystemAddress& sysAddr, Packet* packet) {
User* user = UserManager::Instance()->GetUser(sysAddr);
if (!user) {
Game::logger->Log("ClientPackets", "Unable to get user to parse position update\n");
Game::logger->Log("ClientPackets", "Unable to get user to parse position update");
return;
}
@@ -240,14 +240,14 @@ void ClientPackets::HandleClientPositionUpdate(const SystemAddress& sysAddr, Pac
void ClientPackets::HandleChatModerationRequest(const SystemAddress& sysAddr, Packet* packet) {
User* user = UserManager::Instance()->GetUser(sysAddr);
if (!user) {
Game::logger->Log("ClientPackets", "Unable to get user to parse chat moderation request\n");
Game::logger->Log("ClientPackets", "Unable to get user to parse chat moderation request");
return;
}
auto* entity = Player::GetPlayer(sysAddr);
if (entity == nullptr) {
Game::logger->Log("ClientPackets", "Unable to get player to parse chat moderation request\n");
Game::logger->Log("ClientPackets", "Unable to get player to parse chat moderation request");
return;
}