[Performance] Reworked how all log calls are made in the source, see changelog.txt for more details

This commit is contained in:
Akkadius
2017-04-01 03:51:46 -05:00
parent 93a6efa95f
commit 7aa1d243b0
131 changed files with 3126 additions and 3066 deletions
+7 -7
View File
@@ -139,11 +139,11 @@ bool EQWHTTPHandler::CheckAuth() const {
int16 status = 0;
uint32 acctid = database.CheckLogin(m_username.c_str(), m_password.c_str(), &status);
if(acctid == 0) {
Log.Out(Logs::Detail, Logs::World_Server, "Login autentication failed for %s with '%s'", m_username.c_str(), m_password.c_str());
Log(Logs::Detail, Logs::World_Server, "Login autentication failed for %s with '%s'", m_username.c_str(), m_password.c_str());
return(false);
}
if(status < httpLoginStatus) {
Log.Out(Logs::Detail, Logs::World_Server, "Login of %s failed: status too low.", m_username.c_str());
Log(Logs::Detail, Logs::World_Server, "Login of %s failed: status too low.", m_username.c_str());
return(false);
}
@@ -278,29 +278,29 @@ void EQWHTTPServer::CreateNewConnection(uint32 ID, SOCKET in_socket, uint32 irIP
}
void EQWHTTPServer::Stop() {
Log.Out(Logs::Detail, Logs::World_Server, "Requesting that HTTP Service stop.");
Log(Logs::Detail, Logs::World_Server, "Requesting that HTTP Service stop.");
m_running = false;
Close();
}
bool EQWHTTPServer::Start(uint16 port, const char *mime_file) {
if(m_running) {
Log.Out(Logs::Detail, Logs::World_Server, "HTTP Service is already running on port %d", m_port);
Log(Logs::Detail, Logs::World_Server, "HTTP Service is already running on port %d", m_port);
return(false);
}
//load up our nice mime types
if(!EQWHTTPHandler::LoadMimeTypes(mime_file)) {
Log.Out(Logs::Detail, Logs::World_Server, "Failed to load mime types from '%s'", mime_file);
Log(Logs::Detail, Logs::World_Server, "Failed to load mime types from '%s'", mime_file);
return(false);
} else {
Log.Out(Logs::Detail, Logs::World_Server, "Loaded mime types from %s", mime_file);
Log(Logs::Detail, Logs::World_Server, "Loaded mime types from %s", mime_file);
}
//fire up the server thread
char errbuf[TCPServer_ErrorBufferSize];
if(!Open(port, errbuf)) {
Log.Out(Logs::Detail, Logs::World_Server, "Unable to bind to port %d for HTTP service: %s", port, errbuf);
Log(Logs::Detail, Logs::World_Server, "Unable to bind to port %d for HTTP service: %s", port, errbuf);
return(false);
}