mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 14:41:28 +00:00
[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
This commit is contained in:
parent
999fe10d86
commit
b5a2713a3a
@ -136,6 +136,7 @@ namespace Logs {
|
|||||||
PacketServerToServer,
|
PacketServerToServer,
|
||||||
Bugs,
|
Bugs,
|
||||||
QuestErrors,
|
QuestErrors,
|
||||||
|
PlayerEvents,
|
||||||
MaxCategoryID /* Don't Remove this */
|
MaxCategoryID /* Don't Remove this */
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -230,7 +231,8 @@ namespace Logs {
|
|||||||
"Packet C->S",
|
"Packet C->S",
|
||||||
"Packet S->S",
|
"Packet S->S",
|
||||||
"Bugs",
|
"Bugs",
|
||||||
"QuestErrors"
|
"QuestErrors",
|
||||||
|
"PlayerEvents",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -784,6 +784,16 @@
|
|||||||
OutF(LogSys, Logs::Detail, Logs::QuestErrors, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
OutF(LogSys, Logs::Detail, Logs::QuestErrors, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||||
} while (0)
|
} 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 {\
|
#define Log(debug_level, log_category, message, ...) do {\
|
||||||
if (LogSys.IsLogEnabled(debug_level, log_category))\
|
if (LogSys.IsLogEnabled(debug_level, log_category))\
|
||||||
LogSys.Out(debug_level, log_category, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
LogSys.Out(debug_level, log_category, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||||
|
|||||||
@ -121,7 +121,7 @@ void PlayerEventLogs::ProcessBatchQueue()
|
|||||||
|
|
||||||
// flush many
|
// flush many
|
||||||
PlayerEventLogsRepository::InsertMany(*m_database, m_record_batch_queue);
|
PlayerEventLogsRepository::InsertMany(*m_database, m_record_batch_queue);
|
||||||
LogInfo(
|
LogPlayerEventsDetail(
|
||||||
"Processing batch player event log queue of [{}] took [{}]",
|
"Processing batch player event log queue of [{}] took [{}]",
|
||||||
m_record_batch_queue.size(),
|
m_record_batch_queue.size(),
|
||||||
benchmark.elapsed()
|
benchmark.elapsed()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user