Convert world debugging _log to logger.LogDebugType

This commit is contained in:
Akkadius
2015-01-12 22:28:16 -06:00
parent bc02d7c31a
commit 6e11baf308
17 changed files with 164 additions and 164 deletions
+9 -9
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(WORLD__HTTP_ERR, "Login autentication failed for %s with '%s'", m_username.c_str(), m_password.c_str());
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "Login autentication failed for %s with '%s'", m_username.c_str(), m_password.c_str());
return(false);
}
if(status < httpLoginStatus) {
_log(WORLD__HTTP_ERR, "Login of %s failed: status too low.", m_username.c_str());
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::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(WORLD__HTTP, "Requesting that HTTP Service stop.");
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "Requesting that HTTP Service stop.");
m_running = false;
Close();
}
bool EQWHTTPServer::Start(uint16 port, const char *mime_file) {
if(m_running) {
_log(WORLD__HTTP_ERR, "HTTP Service is already running on port %d", m_port);
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::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(WORLD__HTTP_ERR, "Failed to load mime types from '%s'", mime_file);
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "Failed to load mime types from '%s'", mime_file);
return(false);
} else {
_log(WORLD__HTTP, "Loaded mime types from %s", mime_file);
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "Loaded mime types from %s", mime_file);
}
//fire up the server thread
char errbuf[TCPServer_ErrorBufferSize];
if(!Open(port, errbuf)) {
_log(WORLD__HTTP_ERR, "Unable to bind to port %d for HTTP service: %s", port, errbuf);
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "Unable to bind to port %d for HTTP service: %s", port, errbuf);
return(false);
}
@@ -320,12 +320,12 @@ bool EQWHTTPServer::Start(uint16 port, const char *mime_file) {
/*
void EQWHTTPServer::Run() {
_log(WORLD__HTTP, "HTTP Processing thread started on port %d", m_port);
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "HTTP Processing thread started on port %d", m_port);
do {
#warning DELETE THIS IF YOU DONT USE IT
Sleep(10);
} while(m_running);
_log(WORLD__HTTP, "HTTP Processing thread terminating on port %d", m_port);
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::World_Server, "HTTP Processing thread terminating on port %d", m_port);
}
ThreadReturnType EQWHTTPServer::ThreadProc(void *data) {