diff --git a/client_files/export/main.cpp b/client_files/export/main.cpp index 8bf6827d4..87874fc61 100644 --- a/client_files/export/main.cpp +++ b/client_files/export/main.cpp @@ -17,6 +17,8 @@ */ #include + +#include "../../common/eqemu_logsys.h" #include "../../common/debug.h" #include "../../common/shareddb.h" #include "../../common/eqemu_config.h" @@ -25,6 +27,8 @@ #include "../../common/rulesys.h" #include "../../common/string_util.h" +EQEmuLogSys logger; + void ExportSpells(SharedDatabase *db); void ExportSkillCaps(SharedDatabase *db); void ExportBaseData(SharedDatabase *db); diff --git a/client_files/import/main.cpp b/client_files/import/main.cpp index 7617248d0..390c1c109 100644 --- a/client_files/import/main.cpp +++ b/client_files/import/main.cpp @@ -16,6 +16,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "../../common/eqemu_logsys.h" #include "../../common/debug.h" #include "../../common/shareddb.h" #include "../../common/eqemu_config.h" @@ -24,6 +25,8 @@ #include "../../common/rulesys.h" #include "../../common/string_util.h" +EQEmuLogSys logger; + void ImportSpells(SharedDatabase *db); void ImportSkillCaps(SharedDatabase *db); void ImportBaseData(SharedDatabase *db); diff --git a/common/eqemu_logsys.cpp b/common/eqemu_logsys.cpp index 3da479576..ee3cb98ce 100644 --- a/common/eqemu_logsys.cpp +++ b/common/eqemu_logsys.cpp @@ -90,8 +90,9 @@ void EQEmuLogSys::StartZoneLogs(const std::string log_name) process_log.open(StringFormat("logs/zone/%s.txt", log_name.c_str()), std::ios_base::app | std::ios_base::out); } -void EQEmuLogSys::LogDebug(DebugLevel debug_level, std::string message, ...){ - if (RuleI(Logging, DebugLogLevel) < debug_level){ return; } +void EQEmuLogSys::LogDebug(DebugLevel debug_level, std::string message, ...) +{ + if (RuleI(Logging, DebugLogLevel) < debug_level){ return; } va_list args; va_start(args, message); @@ -103,7 +104,7 @@ void EQEmuLogSys::LogDebug(DebugLevel debug_level, std::string message, ...){ void EQEmuLogSys::Log(uint16 log_type, const std::string message, ...) { - if (log_type > EQEmuLogSys::MaxLogID){ + if (log_type > EQEmuLogSys::MaxLogID){ return; } if (!RuleB(Logging, LogFileCommands) && log_type == EQEmuLogSys::LogType::Commands){ return; } @@ -152,7 +153,8 @@ void EQEmuLogSys::ConsoleMessage(uint16 log_type, const std::string message) #endif } -void EQEmuLogSys::CloseZoneLogs(){ +void EQEmuLogSys::CloseZoneLogs() +{ std::cout << "Closing down zone logs..." << std::endl; process_log.close(); } \ No newline at end of file diff --git a/common/eqemu_logsys.h b/common/eqemu_logsys.h index cfeea78ce..fff2af07f 100644 --- a/common/eqemu_logsys.h +++ b/common/eqemu_logsys.h @@ -34,7 +34,7 @@ public: Error, /* Error Logs */ Debug, /* Debug Logs */ Quest, /* Quest Logs */ - Commands, /* Issued Comamnds */ + Commands, /* Issued Commands */ Crash, /* Crash Logs */ Save, /* Client Saves */ MaxLogID /* Max, used in functions to get the max log ID */ @@ -61,5 +61,4 @@ private: extern EQEmuLogSys logger; - #endif \ No newline at end of file diff --git a/eqlaunch/eqlaunch.cpp b/eqlaunch/eqlaunch.cpp index fbac09541..5ddcfefdd 100644 --- a/eqlaunch/eqlaunch.cpp +++ b/eqlaunch/eqlaunch.cpp @@ -17,6 +17,7 @@ */ #include "../common/debug.h" +#include "../common/eqemu_logsys.h" #include "../common/proc_launcher.h" #include "../common/eqemu_config.h" #include "../common/servertalk.h" @@ -30,6 +31,8 @@ #include #include +EQEmuLogSys logger; + bool RunLoops = false; void CatchSignal(int sig_num); diff --git a/eqlaunch/worldserver.cpp b/eqlaunch/worldserver.cpp index 1754b6564..920bf982e 100644 --- a/eqlaunch/worldserver.cpp +++ b/eqlaunch/worldserver.cpp @@ -15,6 +15,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + #include "../common/debug.h" #include "../common/servertalk.h" #include "../common/eqemu_config.h" diff --git a/queryserv/queryserv.cpp b/queryserv/queryserv.cpp index 22ddb87ee..ce64b646b 100644 --- a/queryserv/queryserv.cpp +++ b/queryserv/queryserv.cpp @@ -18,6 +18,7 @@ */ #include "../common/debug.h" +#include "../common/eqemu_logsys.h" #include "../common/opcodemgr.h" #include "../common/eq_stream_factory.h" #include "../common/rulesys.h" @@ -39,6 +40,7 @@ LFGuildManager lfguildmanager; std::string WorldShortName; const queryservconfig *Config; WorldServer *worldserver = 0; +EQEmuLogSys logger; void CatchSignal(int sig_num) { RunLoops = false; diff --git a/shared_memory/main.cpp b/shared_memory/main.cpp index b9ee32929..dbb1885d1 100644 --- a/shared_memory/main.cpp +++ b/shared_memory/main.cpp @@ -17,6 +17,8 @@ */ #include + +#include "../common/eqemu_logsys.h" #include "../common/debug.h" #include "../common/shareddb.h" #include "../common/eqemu_config.h" @@ -31,6 +33,8 @@ #include "spells.h" #include "base_data.h" +EQEmuLogSys logger; + int main(int argc, char **argv) { RegisterExecutablePlatform(ExePlatformSharedMemory); set_exception_handler(); diff --git a/ucs/ucs.cpp b/ucs/ucs.cpp index dd5f304b3..ad3af0379 100644 --- a/ucs/ucs.cpp +++ b/ucs/ucs.cpp @@ -17,6 +17,7 @@ */ +#include "../common/eqemu_logsys.h" #include "../common/debug.h" #include "clientlist.h" #include "../common/opcodemgr.h" @@ -50,6 +51,7 @@ std::string WorldShortName; const ucsconfig *Config; WorldServer *worldserver = nullptr; +EQEmuLogSys logger; void CatchSignal(int sig_num) { diff --git a/world/net.cpp b/world/net.cpp index dbc63ee5d..11de88892 100644 --- a/world/net.cpp +++ b/world/net.cpp @@ -25,6 +25,7 @@ #include #include "../common/debug.h" +#include "../common/eqemu_logsys.h" #include "../common/queue.h" #include "../common/timer.h" #include "../common/eq_stream_factory.h" @@ -103,7 +104,7 @@ volatile bool RunLoops = true; uint32 numclients = 0; uint32 numzones = 0; bool holdzones = false; - +EQEmuLogSys logger; extern ConsoleList console_list; diff --git a/zone/pathing.cpp b/zone/pathing.cpp index 0d201bc6b..5550c1519 100644 --- a/zone/pathing.cpp +++ b/zone/pathing.cpp @@ -206,10 +206,10 @@ Map::Vertex PathManager::GetPathNodeCoordinates(int NodeNumber, bool BestZ) } std::deque PathManager::FindRoute(int startID, int endID) -{ +{ _log(PATHING__DEBUG, "FindRoute from node %i to %i", startID, endID); - memset(ClosedListFlag, 0, sizeof(int) * Head.PathNodeCount); + memset(ClosedListFlag, 0, sizeof(int) * Head.PathNodeCount); std::deque OpenList, ClosedList;