mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-15 16:41:29 +00:00
Added Logs::DebugQuest category per request from Trevius (Great idea)
- Exported quest::debug(log_message, [debug_level = 1)
- Example:
quest::debug("This is a test debug message, level 1 (default)");
quest::debug("This is a test debug message, level 1", 1);
quest::debug("This is a test debug message, level 2", 2);
quest::debug("This is a test debug message, level 3", 3);
Result: http://i.imgur.com/6VoafGE.png
- Uses traditional logging system to output this category
- Required MySQL Source in Database version 9070
This commit is contained in:
parent
61e9160d47
commit
0c934272c0
@ -1,5 +1,18 @@
|
|||||||
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||||
-------------------------------------------------------
|
-------------------------------------------------------
|
||||||
|
== 01/28/2015 ==
|
||||||
|
Akkadius: Added Logs::DebugQuest category per request from Trevius (Great idea)
|
||||||
|
- Exported quest::debug(log_message, [debug_level = 1)
|
||||||
|
- Example:
|
||||||
|
quest::debug("This is a test debug message, level 1 (default)");
|
||||||
|
quest::debug("This is a test debug message, level 1", 1);
|
||||||
|
quest::debug("This is a test debug message, level 2", 2);
|
||||||
|
quest::debug("This is a test debug message, level 3", 3);
|
||||||
|
|
||||||
|
Result: http://i.imgur.com/6VoafGE.png
|
||||||
|
- Uses traditional logging system to output this category
|
||||||
|
- Required MySQL Source in Database version 9070
|
||||||
|
|
||||||
== 01/27/2015 ==
|
== 01/27/2015 ==
|
||||||
Trevius: Removed "Mercenary Debug:" from the Mercenary Log entries.
|
Trevius: Removed "Mercenary Debug:" from the Mercenary Log entries.
|
||||||
Trevius: Resolved duplicate "You have no Mercenaries" messages when zoning without owning a Mercenary.
|
Trevius: Resolved duplicate "You have no Mercenaries" messages when zoning without owning a Mercenary.
|
||||||
|
|||||||
@ -77,6 +77,7 @@ namespace Logs{
|
|||||||
MySQLError,
|
MySQLError,
|
||||||
MySQLQuery,
|
MySQLQuery,
|
||||||
Mercenaries,
|
Mercenaries,
|
||||||
|
QuestDebug,
|
||||||
MaxCategoryID /* Don't Remove this*/
|
MaxCategoryID /* Don't Remove this*/
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -120,6 +121,7 @@ namespace Logs{
|
|||||||
"MySQL Error",
|
"MySQL Error",
|
||||||
"MySQL Query",
|
"MySQL Query",
|
||||||
"Mercenaries",
|
"Mercenaries",
|
||||||
|
"Quest Debug",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -141,7 +143,7 @@ public:
|
|||||||
be checked against to see if that piped output is set to actually process it for the category and debug level
|
be checked against to see if that piped output is set to actually process it for the category and debug level
|
||||||
*/
|
*/
|
||||||
void Out(Logs::DebugLevel debug_level, uint16 log_category, std::string message, ...);
|
void Out(Logs::DebugLevel debug_level, uint16 log_category, std::string message, ...);
|
||||||
void SetCurrentTimeStamp(char* time_stamp); /* Used in file logs to prepend a timestamp entry for logs */
|
void SetCurrentTimeStamp(char* time_stamp); /* Used in file logs to prepend a timestamp entry for logs */
|
||||||
void StartFileLogs(const std::string &log_name = ""); /* Used to declare the processes file log and to keep it open for later use */
|
void StartFileLogs(const std::string &log_name = ""); /* Used to declare the processes file log and to keep it open for later use */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt
|
Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define CURRENT_BINARY_DATABASE_VERSION 9069
|
#define CURRENT_BINARY_DATABASE_VERSION 9070
|
||||||
#define COMPILE_DATE __DATE__
|
#define COMPILE_DATE __DATE__
|
||||||
#define COMPILE_TIME __TIME__
|
#define COMPILE_TIME __TIME__
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
|
|||||||
@ -323,6 +323,7 @@
|
|||||||
9067|2015_01_21_npc_types_update.sql|SHOW COLUMNS FROM `npc_types` LIKE 'light'|empty|
|
9067|2015_01_21_npc_types_update.sql|SHOW COLUMNS FROM `npc_types` LIKE 'light'|empty|
|
||||||
9068|2015_01_15_logsys_categories_table.sql|SHOW TABLES LIKE 'logsys_categories'|empty|
|
9068|2015_01_15_logsys_categories_table.sql|SHOW TABLES LIKE 'logsys_categories'|empty|
|
||||||
9069|2015_01_25_logsys_Mercenaries_category.sql|SELECT * FROM `logsys_categories` WHERE `log_category_description` LIKE 'Mercenaries'|empty|
|
9069|2015_01_25_logsys_Mercenaries_category.sql|SELECT * FROM `logsys_categories` WHERE `log_category_description` LIKE 'Mercenaries'|empty|
|
||||||
|
9070|2015_01_28_quest_debug_log_category.sql|SELECT * FROM `logsys_categories` WHERE `log_category_description` LIKE 'Quest Debug'|empty|
|
||||||
|
|
||||||
# Upgrade conditions:
|
# Upgrade conditions:
|
||||||
# This won't be needed after this system is implemented, but it is used database that are not
|
# This won't be needed after this system is implemented, but it is used database that are not
|
||||||
|
|||||||
@ -0,0 +1 @@
|
|||||||
|
INSERT INTO `logsys_categories` (`log_category_id`, `log_category_description`, `log_to_gmsay`) VALUES ('38', 'Quest Debug', '1')
|
||||||
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
#include "../common/global_define.h"
|
#include "../common/global_define.h"
|
||||||
#include "../common/misc_functions.h"
|
#include "../common/misc_functions.h"
|
||||||
|
#include "../common/eqemu_logsys.h"
|
||||||
|
|
||||||
#include "embparser.h"
|
#include "embparser.h"
|
||||||
#include "embxs.h"
|
#include "embxs.h"
|
||||||
@ -3493,6 +3494,37 @@ XS(XS__crosszonesignalnpcbynpctypeid)
|
|||||||
XSRETURN_EMPTY;
|
XSRETURN_EMPTY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
XS(XS__debug);
|
||||||
|
XS(XS__debug)
|
||||||
|
{
|
||||||
|
dXSARGS;
|
||||||
|
if (items != 1 && items != 2){
|
||||||
|
Perl_croak(aTHX_ "Usage: debug(message, [debug_level])");
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
std::string log_message = (std::string)SvPV_nolen(ST(0));
|
||||||
|
uint8 debug_level = 1;
|
||||||
|
|
||||||
|
if (items == 2)
|
||||||
|
debug_level = (uint8)SvIV(ST(1));
|
||||||
|
|
||||||
|
if (debug_level > Logs::Detail)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (debug_level == Logs::General){
|
||||||
|
Log.Out(Logs::General, Logs::QuestDebug, log_message);
|
||||||
|
}
|
||||||
|
else if (debug_level == Logs::Moderate){
|
||||||
|
Log.Out(Logs::Moderate, Logs::QuestDebug, log_message);
|
||||||
|
}
|
||||||
|
else if (debug_level == Logs::Detail){
|
||||||
|
Log.Out(Logs::Detail, Logs::QuestDebug, log_message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
XSRETURN_EMPTY;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
This is the callback perl will look for to setup the
|
This is the callback perl will look for to setup the
|
||||||
quest package's XSUBs
|
quest package's XSUBs
|
||||||
@ -3579,6 +3611,7 @@ EXTERN_C XS(boot_quest)
|
|||||||
newXS(strcpy(buf, "crosszonesignalclientbycharid"), XS__crosszonesignalclientbycharid, file);
|
newXS(strcpy(buf, "crosszonesignalclientbycharid"), XS__crosszonesignalclientbycharid, file);
|
||||||
newXS(strcpy(buf, "crosszonesignalclientbyname"), XS__crosszonesignalclientbyname, file);
|
newXS(strcpy(buf, "crosszonesignalclientbyname"), XS__crosszonesignalclientbyname, file);
|
||||||
newXS(strcpy(buf, "crosszonesignalnpcbynpctypeid"), XS__crosszonesignalnpcbynpctypeid, file);
|
newXS(strcpy(buf, "crosszonesignalnpcbynpctypeid"), XS__crosszonesignalnpcbynpctypeid, file);
|
||||||
|
newXS(strcpy(buf, "debug"), XS__debug, file);
|
||||||
newXS(strcpy(buf, "delglobal"), XS__delglobal, file);
|
newXS(strcpy(buf, "delglobal"), XS__delglobal, file);
|
||||||
newXS(strcpy(buf, "depop"), XS__depop, file);
|
newXS(strcpy(buf, "depop"), XS__depop, file);
|
||||||
newXS(strcpy(buf, "depop_withtimer"), XS__depop_withtimer, file);
|
newXS(strcpy(buf, "depop_withtimer"), XS__depop_withtimer, file);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user