mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +00:00
Keep mlog happy until it is completely replaced
This commit is contained in:
parent
2bc6ed17c7
commit
a6c521a73e
@ -159,7 +159,7 @@ extern void log_raw_packet(LogType type, uint16 seq, const BasePacket *p);
|
||||
extern void log_packet_mob(LogType type, Mob *who, const BasePacket *p);
|
||||
#define mpkt( type, packet) \
|
||||
do { \
|
||||
if(IsLoggingEnabled()) \
|
||||
if(1) \
|
||||
if(log_type_info[ type ].enabled) { \
|
||||
log_packet_mob(type, this, packet); \
|
||||
} \
|
||||
|
||||
@ -25,8 +25,8 @@
|
||||
#include <stdarg.h>
|
||||
|
||||
void log_message_mob(LogType type, Mob *who, const char *fmt, ...) {
|
||||
if(!who->IsLoggingEnabled())
|
||||
return; //could prolly put this in the macro, but it feels even dirtier than prototyping this in common
|
||||
// if(!who->IsLoggingEnabled())
|
||||
// return; //could prolly put this in the macro, but it feels even dirtier than prototyping this in common
|
||||
|
||||
char prefix_buffer[256];
|
||||
snprintf(prefix_buffer, 255, "[%s] %s: ", log_type_info[type].name, who->GetName());
|
||||
@ -39,8 +39,8 @@ void log_message_mob(LogType type, Mob *who, const char *fmt, ...) {
|
||||
}
|
||||
|
||||
void log_message_mobVA(LogType type, Mob *who, const char *fmt, va_list args) {
|
||||
if(!who->IsLoggingEnabled())
|
||||
return; //could prolly put this in the macro, but it feels even dirtier than prototyping this in common
|
||||
// if(!who->IsLoggingEnabled())
|
||||
// return; //could prolly put this in the macro, but it feels even dirtier than prototyping this in common
|
||||
|
||||
char prefix_buffer[256];
|
||||
snprintf(prefix_buffer, 255, "[%s] %s: ", log_type_info[type].name, who->GetName());
|
||||
@ -50,15 +50,15 @@ void log_message_mobVA(LogType type, Mob *who, const char *fmt, va_list args) {
|
||||
}
|
||||
|
||||
void log_hex_mob(LogType type, Mob *who, const char *data, uint32 length, uint8 padding) {
|
||||
if(!who->IsLoggingEnabled())
|
||||
return; //could prolly put this in the macro, but it feels even dirtier than prototyping this in common
|
||||
// if(!who->IsLoggingEnabled())
|
||||
// return; //could prolly put this in the macro, but it feels even dirtier than prototyping this in common
|
||||
|
||||
log_hex(type,data,length,padding);
|
||||
}
|
||||
|
||||
void log_packet_mob(LogType type, Mob *who, const BasePacket *p) {
|
||||
if(!who->IsLoggingEnabled())
|
||||
return; //could prolly put this in the macro, but it feels even dirtier than prototyping this in common
|
||||
// if(!who->IsLoggingEnabled())
|
||||
// return; //could prolly put this in the macro, but it feels even dirtier than prototyping this in common
|
||||
|
||||
char buffer[80];
|
||||
p->build_header_dump(buffer);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user