[Combat] Basic Combat Recording (#2090)

* Basic combat recording

* Update combat_record.h
This commit is contained in:
Chris Miles
2022-05-01 18:08:12 -05:00
committed by GitHub
parent 759f9bd007
commit c7dbdfae58
10 changed files with 138 additions and 14 deletions
+1
View File
@@ -134,6 +134,7 @@ EQEmuLogSys *EQEmuLogSys::LoadLogSettingsDefaults()
log_settings[Logs::HTTP].log_to_gmsay = static_cast<uint8>(Logs::General);
log_settings[Logs::ChecksumVerification].log_to_console = static_cast<uint8>(Logs::General);
log_settings[Logs::ChecksumVerification].log_to_gmsay = static_cast<uint8>(Logs::General);
log_settings[Logs::CombatRecord].log_to_gmsay = static_cast<uint8>(Logs::General);
/**
* RFC 5424
+2
View File
@@ -128,6 +128,7 @@ namespace Logs {
HTTP,
Saylink,
ChecksumVerification,
CombatRecord,
MaxCategoryID /* Don't Remove this */
};
@@ -214,6 +215,7 @@ namespace Logs {
"HTTP",
"Saylink",
"ChecksumVerification",
"CombatRecord",
};
}
+16
View File
@@ -706,6 +706,16 @@
OutF(LogSys, Logs::Detail, Logs::ChecksumVerification, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
} while (0)
#define LogCombatRecord(message, ...) do {\
if (LogSys.log_settings[Logs::CombatRecord].is_category_enabled == 1)\
OutF(LogSys, Logs::General, Logs::CombatRecord, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
} while (0)
#define LogCombatRecordDetail(message, ...) do {\
if (LogSys.log_settings[Logs::CombatRecord].is_category_enabled == 1)\
OutF(LogSys, Logs::Detail, Logs::CombatRecord, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
} while (0)
#define Log(debug_level, log_category, message, ...) do {\
if (LogSys.log_settings[log_category].is_category_enabled == 1)\
LogSys.Out(debug_level, log_category, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
@@ -1138,6 +1148,12 @@
#define LogChecksumVerificationDetail(message, ...) do {\
} while (0)
#define LogCombatRecord(message, ...) do {\
} while (0)
#define LogCombatRecordDetail(message, ...) do {\
} while (0)
#define Log(debug_level, log_category, message, ...) do {\
} while (0)