Skip to content

Commit b5a2713

Browse files
authored
[Player Events] Add logging category to hold processing batch logs (#2954)
* [Player Events] Add logging category to hold processing batch logs * Update player_event_logs.cpp
1 parent 999fe10 commit b5a2713

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

common/eqemu_logsys.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ namespace Logs {
136136
PacketServerToServer,
137137
Bugs,
138138
QuestErrors,
139+
PlayerEvents,
139140
MaxCategoryID /* Don't Remove this */
140141
};
141142

@@ -230,7 +231,8 @@ namespace Logs {
230231
"Packet C->S",
231232
"Packet S->S",
232233
"Bugs",
233-
"QuestErrors"
234+
"QuestErrors",
235+
"PlayerEvents",
234236
};
235237
}
236238

common/eqemu_logsys_log_aliases.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -784,6 +784,16 @@
784784
OutF(LogSys, Logs::Detail, Logs::QuestErrors, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
785785
} while (0)
786786

787+
#define LogPlayerEvents(message, ...) do {\
788+
if (LogSys.IsLogEnabled(Logs::General, Logs::PlayerEvents))\
789+
OutF(LogSys, Logs::General, Logs::PlayerEvents, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
790+
} while (0)
791+
792+
#define LogPlayerEventsDetail(message, ...) do {\
793+
if (LogSys.IsLogEnabled(Logs::Detail, Logs::PlayerEvents))\
794+
OutF(LogSys, Logs::Detail, Logs::PlayerEvents, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
795+
} while (0)
796+
787797
#define Log(debug_level, log_category, message, ...) do {\
788798
if (LogSys.IsLogEnabled(debug_level, log_category))\
789799
LogSys.Out(debug_level, log_category, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\

common/events/player_event_logs.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ void PlayerEventLogs::ProcessBatchQueue()
121121

122122
// flush many
123123
PlayerEventLogsRepository::InsertMany(*m_database, m_record_batch_queue);
124-
LogInfo(
124+
LogPlayerEventsDetail(
125125
"Processing batch player event log queue of [{}] took [{}]",
126126
m_record_batch_queue.size(),
127127
benchmark.elapsed()

0 commit comments

Comments
 (0)