diff --git a/common/eqemu_logsys.h b/common/eqemu_logsys.h index 0c8ec1ae3e..bea481a293 100644 --- a/common/eqemu_logsys.h +++ b/common/eqemu_logsys.h @@ -136,6 +136,7 @@ namespace Logs { PacketServerToServer, Bugs, QuestErrors, + PlayerEvents, MaxCategoryID /* Don't Remove this */ }; @@ -230,7 +231,8 @@ namespace Logs { "Packet C->S", "Packet S->S", "Bugs", - "QuestErrors" + "QuestErrors", + "PlayerEvents", }; } diff --git a/common/eqemu_logsys_log_aliases.h b/common/eqemu_logsys_log_aliases.h index 4db8b6edc4..3b4c0960dc 100644 --- a/common/eqemu_logsys_log_aliases.h +++ b/common/eqemu_logsys_log_aliases.h @@ -784,6 +784,16 @@ OutF(LogSys, Logs::Detail, Logs::QuestErrors, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\ } while (0) +#define LogPlayerEvents(message, ...) do {\ + if (LogSys.IsLogEnabled(Logs::General, Logs::PlayerEvents))\ + OutF(LogSys, Logs::General, Logs::PlayerEvents, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\ +} while (0) + +#define LogPlayerEventsDetail(message, ...) do {\ + if (LogSys.IsLogEnabled(Logs::Detail, Logs::PlayerEvents))\ + OutF(LogSys, Logs::Detail, Logs::PlayerEvents, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\ +} while (0) + #define Log(debug_level, log_category, message, ...) do {\ if (LogSys.IsLogEnabled(debug_level, log_category))\ LogSys.Out(debug_level, log_category, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\ diff --git a/common/events/player_event_logs.cpp b/common/events/player_event_logs.cpp index 0d0ecf287a..ec4e989831 100644 --- a/common/events/player_event_logs.cpp +++ b/common/events/player_event_logs.cpp @@ -121,7 +121,7 @@ void PlayerEventLogs::ProcessBatchQueue() // flush many PlayerEventLogsRepository::InsertMany(*m_database, m_record_batch_queue); - LogInfo( + LogPlayerEventsDetail( "Processing batch player event log queue of [{}] took [{}]", m_record_batch_queue.size(), benchmark.elapsed()