Added EQEmuLogSys logger; pointer to the rest of the projects

This commit is contained in:
Akkadius 2015-01-10 18:12:58 -06:00
parent b7ade8bf1b
commit 7a9860fdd1
11 changed files with 30 additions and 9 deletions

View File

@ -17,6 +17,8 @@
*/
#include <stdio.h>
#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);

View File

@ -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);

View File

@ -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();
}

View File

@ -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

View File

@ -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 <signal.h>
#include <time.h>
EQEmuLogSys logger;
bool RunLoops = false;
void CatchSignal(int sig_num);

View File

@ -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"

View File

@ -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;

View File

@ -17,6 +17,8 @@
*/
#include <stdio.h>
#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();

View File

@ -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) {

View File

@ -25,6 +25,7 @@
#include <signal.h>
#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;

View File

@ -206,10 +206,10 @@ Map::Vertex PathManager::GetPathNodeCoordinates(int NodeNumber, bool BestZ)
}
std::deque<int> 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<AStarNode> OpenList, ClosedList;