log_sys to logger

enum DebugLevel {
		General = 0,	/* 0 - Low-Level general debugging, useful info on single line */
		Moderate,		/* 1 - Informational based, used in functions, when particular things load */
		Detail,			/* 2 - Use this for extreme detail in logging, usually in extreme debugging in the stack or interprocess communication */
	};
void EQEmuLogSys::LogDebug(DebugLevel debug_level, std::string message, ...)
This commit is contained in:
Akkadius
2015-01-10 14:40:47 -06:00
parent b8ed29c600
commit 84741e4cb1
4 changed files with 40 additions and 16 deletions
+5 -1
View File
@@ -103,7 +103,7 @@ TitleManager title_manager;
QueryServ *QServ = 0;
TaskManager *taskmanager = 0;
QuestParserCollection *parse = 0;
EQEmuLogSys log_sys;
EQEmuLogSys logger;
const SPDat_Spell_Struct* spells;
void LoadSpells(EQEmu::MemoryMappedFile **mmf);
@@ -146,6 +146,8 @@ int main(int argc, char** argv) {
worldserver.SetLauncherName("NONE");
}
_log(ZONE__INIT, "Loading server configuration..");
if (!ZoneConfig::LoadConfig()) {
_log(ZONE__INIT_ERR, "Loading server configuration failed.");
@@ -174,6 +176,8 @@ int main(int argc, char** argv) {
GuildBanks = nullptr;
logger.LogDebug(EQEmuLogSys::DebugLevel::General, "This is a crazy test message, database is %s and username is %s", Config->DatabaseDB.c_str(), Config->DatabaseUsername.c_str());
#ifdef _EQDEBUG
_CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
#endif
+2 -2
View File
@@ -152,7 +152,7 @@ bool Zone::Bootup(uint32 iZoneID, uint32 iInstanceID, bool iStaticZone) {
/* Set Logging */
log_sys.StartZoneLogs(StringFormat("%s_ver-%u_instid-%u_port-%u", zone->GetShortName(), zone->GetInstanceVersion(), zone->GetInstanceID(), ZoneConfig::get()->ZonePort));
logger.StartZoneLogs(StringFormat("%s_ver-%u_instid-%u_port-%u", zone->GetShortName(), zone->GetInstanceVersion(), zone->GetInstanceID(), ZoneConfig::get()->ZonePort));
return true;
}
@@ -720,7 +720,7 @@ void Zone::Shutdown(bool quite)
parse->ReloadQuests(true);
UpdateWindowTitle();
log_sys.CloseZoneLogs();
logger.CloseZoneLogs();
}
void Zone::LoadZoneDoors(const char* zone, int16 version)