Added the action logging system

This commit is contained in:
WolverinDEV
2020-06-28 14:01:14 +02:00
parent 8e16309930
commit 68cfab1ac9
22 changed files with 2988 additions and 86 deletions
+5
View File
@@ -11,6 +11,7 @@
#include "src/InstanceHandler.h"
#include "StringVariable.h"
#include "misc/timer.h"
#include "../manager/ActionLogger.h"
using namespace std::chrono;
using namespace ts;
@@ -800,11 +801,15 @@ void SpeakingClient::processJoin() {
}
}
debugMessage(this->getServerId(), "{} Client join timings: {}", CLIENT_STR_LOG_PREFIX, TIMING_FINISH(timings));
serverInstance->action_logger()->client_channel_logger.log_client_join(this->getServerId(), this->ref(), this->getChannelId(), this->currentChannel->name());
}
void SpeakingClient::processLeave() {
auto ownLock = _this.lock();
auto server = this->getServer();
auto channel = this->currentChannel;
if(server){
logMessage(this->getServerId(), "Voice client {}/{} ({}) from {} left.", this->getClientDatabaseId(), this->getUid(), this->getDisplayName(), this->getLoggingPeerIp() + ":" + to_string(this->getPeerPort()));
{