From 733159923adaa03019bdc6efcf457cc066112139 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Mon, 12 Jan 2015 23:01:01 -0600 Subject: [PATCH] Convert 'COMMON' debugging _log to logger.LogDebugType --- common/eq_stream_factory.cpp | 8 ++++---- common/spdat.cpp | 1 + common/tcp_connection.cpp | 4 ++-- common/tcp_server.cpp | 4 ++-- zone/net.cpp | 2 +- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/common/eq_stream_factory.cpp b/common/eq_stream_factory.cpp index 0b940c18f..22412e0fe 100644 --- a/common/eq_stream_factory.cpp +++ b/common/eq_stream_factory.cpp @@ -25,13 +25,13 @@ ThreadReturnType EQStreamFactoryReaderLoop(void *eqfs) EQStreamFactory *fs=(EQStreamFactory *)eqfs; #ifndef WIN32 - _log(COMMON__THREADS, "Starting EQStreamFactoryReaderLoop with thread ID %d", pthread_self()); + logger.LogDebug(EQEmuLogSys::Detail, "Starting EQStreamFactoryReaderLoop with thread ID %d", pthread_self()); #endif fs->ReaderLoop(); #ifndef WIN32 - _log(COMMON__THREADS, "Ending EQStreamFactoryReaderLoop with thread ID %d", pthread_self()); + logger.LogDebug(EQEmuLogSys::Detail, "Ending EQStreamFactoryReaderLoop with thread ID %d", pthread_self()); #endif THREAD_RETURN(nullptr); @@ -42,13 +42,13 @@ ThreadReturnType EQStreamFactoryWriterLoop(void *eqfs) EQStreamFactory *fs=(EQStreamFactory *)eqfs; #ifndef WIN32 - _log(COMMON__THREADS, "Starting EQStreamFactoryWriterLoop with thread ID %d", pthread_self()); + logger.LogDebug(EQEmuLogSys::Detail, "Starting EQStreamFactoryWriterLoop with thread ID %d", pthread_self()); #endif fs->WriterLoop(); #ifndef WIN32 - _log(COMMON__THREADS, "Ending EQStreamFactoryWriterLoop with thread ID %d", pthread_self()); + logger.LogDebug(EQEmuLogSys::Detail, "Ending EQStreamFactoryWriterLoop with thread ID %d", pthread_self()); #endif THREAD_RETURN(nullptr); diff --git a/common/spdat.cpp b/common/spdat.cpp index 22861e53e..08081c8d8 100644 --- a/common/spdat.cpp +++ b/common/spdat.cpp @@ -72,6 +72,7 @@ #include "../common/logsys.h" #include "../common/logtypes.h" +#include "../common/eqemu_logsys.h" #include "classes.h" #include "spdat.h" diff --git a/common/tcp_connection.cpp b/common/tcp_connection.cpp index 890a46adc..3f1e30a46 100644 --- a/common/tcp_connection.cpp +++ b/common/tcp_connection.cpp @@ -899,7 +899,7 @@ ThreadReturnType TCPConnection::TCPConnectionLoop(void* tmp) { } TCPConnection* tcpc = (TCPConnection*) tmp; #ifndef WIN32 - _log(COMMON__THREADS, "Starting TCPConnectionLoop with thread ID %d", pthread_self()); + logger.LogDebug(EQEmuLogSys::Detail, "Starting TCPConnectionLoop with thread ID %d", pthread_self()); #endif tcpc->MLoopRunning.lock(); while (tcpc->RunLoop()) { @@ -926,7 +926,7 @@ ThreadReturnType TCPConnection::TCPConnectionLoop(void* tmp) { tcpc->MLoopRunning.unlock(); #ifndef WIN32 - _log(COMMON__THREADS, "Ending TCPConnectionLoop with thread ID %d", pthread_self()); + logger.LogDebug(EQEmuLogSys::Detail, "Ending TCPConnectionLoop with thread ID %d", pthread_self()); #endif THREAD_RETURN(nullptr); diff --git a/common/tcp_server.cpp b/common/tcp_server.cpp index f99fb256d..2313b9e7c 100644 --- a/common/tcp_server.cpp +++ b/common/tcp_server.cpp @@ -67,7 +67,7 @@ ThreadReturnType BaseTCPServer::TCPServerLoop(void* tmp) { BaseTCPServer* tcps = (BaseTCPServer*) tmp; #ifndef WIN32 - _log(COMMON__THREADS, "Starting TCPServerLoop with thread ID %d", pthread_self()); + logger.LogDebug(EQEmuLogSys::Detail, "Starting TCPServerLoop with thread ID %d", pthread_self()); #endif tcps->MLoopRunning.lock(); @@ -78,7 +78,7 @@ ThreadReturnType BaseTCPServer::TCPServerLoop(void* tmp) { tcps->MLoopRunning.unlock(); #ifndef WIN32 - _log(COMMON__THREADS, "Ending TCPServerLoop with thread ID %d", pthread_self()); + logger.LogDebug(EQEmuLogSys::Detail, "Ending TCPServerLoop with thread ID %d", pthread_self()); #endif THREAD_RETURN(nullptr); diff --git a/zone/net.cpp b/zone/net.cpp index 7ca406a96..df17ff73e 100644 --- a/zone/net.cpp +++ b/zone/net.cpp @@ -343,7 +343,7 @@ int main(int argc, char** argv) { RegisterAllPatches(stream_identifier); #ifndef WIN32 - _log(COMMON__THREADS, "Main thread running with thread id %d", pthread_self()); + logger.LogDebug(EQEmuLogSys::Detail, "Main thread running with thread id %d", pthread_self()); #endif Timer quest_timers(100);