mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-26 01:12:26 +00:00
Added options to CMake to disable GM command logging or disable logging entirely while keeping GM commands enabled.
Cleaned up some logging
This commit is contained in:
parent
e00c57bc47
commit
6e520c8476
@ -115,6 +115,15 @@ SET(EQEMU_DEBUG_LEVEL 5 CACHE STRING "EQEmu debug level:
|
|||||||
|
|
||||||
#Bots are a compile time option so on/off
|
#Bots are a compile time option so on/off
|
||||||
OPTION(EQEMU_ENABLE_BOTS "Enable Bots" OFF)
|
OPTION(EQEMU_ENABLE_BOTS "Enable Bots" OFF)
|
||||||
|
|
||||||
|
#Disable entire _mlog system (excludes trade/command logs)
|
||||||
|
OPTION(DISABLE_LOGSYS "Enable Logging INI System" OFF)
|
||||||
|
|
||||||
|
#Disable entire _mlog system (excludes trade/command logs)
|
||||||
|
OPTION(DISABLE_LOGSYS "Enable Logging INI System" OFF)
|
||||||
|
#Enable GM Command log system
|
||||||
|
OPTION(COMMANDS_LOGGING "Enable GM Command logs" ON)
|
||||||
|
|
||||||
IF(EQEMU_ENABLE_BOTS)
|
IF(EQEMU_ENABLE_BOTS)
|
||||||
ADD_DEFINITIONS(-DBOTS)
|
ADD_DEFINITIONS(-DBOTS)
|
||||||
ENDIF(EQEMU_ENABLE_BOTS)
|
ENDIF(EQEMU_ENABLE_BOTS)
|
||||||
|
|||||||
@ -42,7 +42,7 @@
|
|||||||
#define VERIFY_PACKET_LENGTH(OPCode, Packet, StructName) \
|
#define VERIFY_PACKET_LENGTH(OPCode, Packet, StructName) \
|
||||||
if(Packet->size != sizeof(StructName)) \
|
if(Packet->size != sizeof(StructName)) \
|
||||||
{ \
|
{ \
|
||||||
LogFile->write(EQEMuLog::Debug, "Size mismatch in " #OPCode " expected %i got %i", sizeof(StructName), Packet->size); \
|
_log(NET__ERROR, "Size mismatch in " #OPCode " expected %i got %i", sizeof(StructName), Packet->size); \
|
||||||
DumpPacket(Packet); \
|
DumpPacket(Packet); \
|
||||||
return; \
|
return; \
|
||||||
}
|
}
|
||||||
|
|||||||
@ -105,9 +105,6 @@ Zone extensions and features
|
|||||||
//uncomment to allow perl commands to override compiled commands
|
//uncomment to allow perl commands to override compiled commands
|
||||||
#define COMMANDS_PERL_OVERRIDE
|
#define COMMANDS_PERL_OVERRIDE
|
||||||
|
|
||||||
//enable logging of commands used
|
|
||||||
#define COMMANDS_LOGGING
|
|
||||||
|
|
||||||
//only log commands which require this minimum status or more
|
//only log commands which require this minimum status or more
|
||||||
#define COMMANDS_LOGGING_MIN_STATUS 1
|
#define COMMANDS_LOGGING_MIN_STATUS 1
|
||||||
|
|
||||||
|
|||||||
@ -120,7 +120,7 @@ extern void log_raw_packet(LogType type, uint16 seq, const BasePacket *p);
|
|||||||
#endif
|
#endif
|
||||||
#endif //!DISABLE_LOGSYS
|
#endif //!DISABLE_LOGSYS
|
||||||
|
|
||||||
|
#ifndef DISABLE_LOGSYS
|
||||||
/* these are macros which do not use ..., and work for anybody */
|
/* these are macros which do not use ..., and work for anybody */
|
||||||
#define _hex( type, data, len) \
|
#define _hex( type, data, len) \
|
||||||
do { \
|
do { \
|
||||||
@ -140,6 +140,12 @@ extern void log_raw_packet(LogType type, uint16 seq, const BasePacket *p);
|
|||||||
log_raw_packet(type, seq, packet); \
|
log_raw_packet(type, seq, packet); \
|
||||||
} \
|
} \
|
||||||
} while(false)
|
} while(false)
|
||||||
|
|
||||||
|
#else
|
||||||
|
#define _hex( type, data, len) {}
|
||||||
|
#define _pkt( type, packet) {}
|
||||||
|
#define _raw( type, seq, packet) {}
|
||||||
|
#endif //!DISABLE_LOGSYS
|
||||||
#ifdef ZONE
|
#ifdef ZONE
|
||||||
class Mob;
|
class Mob;
|
||||||
extern void log_hex_mob(LogType type, Mob *who, const char *data, uint32 length);
|
extern void log_hex_mob(LogType type, Mob *who, const char *data, uint32 length);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user