diff --git a/apps/openmw-mp/Log.cpp b/apps/openmw-mp/Log.cpp index 72c534826..aad5ab7d8 100644 --- a/apps/openmw-mp/Log.cpp +++ b/apps/openmw-mp/Log.cpp @@ -58,13 +58,13 @@ void Log::print(int level, const char *file, int line, const char *message, ...) str += "["; switch(level) { - case WARNING: + case LOG_WARN: str += "WARN"; break; - case ERROR: + case LOG_ERROR: str += "ERR"; break; - case FATAL: + case LOG_FATAL: str += "FATAL"; break; default: diff --git a/apps/openmw-mp/Log.hpp b/apps/openmw-mp/Log.hpp index d85bc2afd..4d3c3dd3c 100644 --- a/apps/openmw-mp/Log.hpp +++ b/apps/openmw-mp/Log.hpp @@ -22,10 +22,10 @@ class Log public: enum { - INFO = 0, - WARNING, - ERROR, - FATAL, + LOG_INFO = 0, + LOG_WARN, + LOG_ERROR, + LOG_FATAL, }; static void Create(int logLevel); static void Delete(); diff --git a/apps/openmw-mp/MasterClient.cpp b/apps/openmw-mp/MasterClient.cpp index 60ffb88a8..2ff81548f 100644 --- a/apps/openmw-mp/MasterClient.cpp +++ b/apps/openmw-mp/MasterClient.cpp @@ -93,18 +93,18 @@ RakNet::RakString MasterClient::Send(std::string motd, unsigned players, unsigne // then Receive(), then HasFailedConnectionAttempt(),HasLostConnection() sa = tcpInterface.HasCompletedConnectionAttempt(); if (sa != RakNet::UNASSIGNED_SYSTEM_ADDRESS) - LOG_MESSAGE_SIMPLE(Log::INFO, "Connected to master server: %s", sa.ToString()); + LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Connected to master server: %s", sa.ToString()); sa = tcpInterface.HasFailedConnectionAttempt(); if (sa != RakNet::UNASSIGNED_SYSTEM_ADDRESS) { - LOG_MESSAGE_SIMPLE(Log::WARNING, "Failed to connect to master server: %s", sa.ToString()); + LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Failed to connect to master server: %s", sa.ToString()); return "FAIL_CONNECT"; } sa = tcpInterface.HasLostConnection(); if (sa != RakNet::UNASSIGNED_SYSTEM_ADDRESS) { - LOG_MESSAGE_SIMPLE(Log::WARNING, "Lost connection to master server: %s", sa.ToString()); + LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Lost connection to master server: %s", sa.ToString()); return "LOST_CONNECTION"; } @@ -132,12 +132,12 @@ void MasterClient::Update() while (sRun) { if (response == "Created") - LOG_MESSAGE_SIMPLE(Log::INFO, "Server registered on the master server.", ""); + LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Server registered on the master server.", ""); else if (response == "Accepted") - LOG_MESSAGE_SIMPLE(Log::INFO, "Server updated information about himself on the master server.", ""); + LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Server updated information about himself on the master server.", ""); else if (response == "bad request") { - LOG_MESSAGE_SIMPLE(Log::WARNING, "Update rate is too low, and the master server has deleted information about" + LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Update rate is too low, and the master server has deleted information about" " the server. Trying low rate...", ""); SetUpdateRate(timeout - step_rate); update = false; diff --git a/apps/openmw-mp/main.cpp b/apps/openmw-mp/main.cpp index 17c34fdf8..82791a958 100644 --- a/apps/openmw-mp/main.cpp +++ b/apps/openmw-mp/main.cpp @@ -78,8 +78,8 @@ int main(int argc, char *argv[]) loadSettings(mgr); int logLevel = mgr.getInt("loglevel", "General"); - if(logLevel < Log::INFO || logLevel > Log::FATAL) - logLevel = Log::INFO; + if(logLevel < Log::LOG_INFO || logLevel > Log::LOG_FATAL) + logLevel = Log::LOG_INFO; LOG_INIT(logLevel); int players = mgr.getInt("players", "General"); @@ -120,7 +120,7 @@ int main(int argc, char *argv[]) MasterClient *mclient; if(masterEnabled) { - LOG_MESSAGE_SIMPLE(Log::INFO, "%s", "Sharing server query info to master enabled."); + LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "%s", "Sharing server query info to master enabled."); string masterAddr = mgr.getString("address", "MasterServer"); int masterPort = mgr.getInt("port", "MasterServer"); mclient = new MasterClient(masterAddr, (unsigned short) masterPort, addr, (unsigned short) port); @@ -142,7 +142,7 @@ int main(int argc, char *argv[]) } if (code == 0) - LOG_MESSAGE_SIMPLE(Log::INFO, "%s", "Quitting peacefully."); + LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "%s", "Quitting peacefully."); LOG_QUIT(); return code;