Sentry: add multiple more logging mechanisms, add [CHAT]

This commit is contained in:
Lion Kortlepel authored and Lion committed 2021-09-08 19:55:03 +03:00
1 parent 5330013dc3
commit 8fada3ac04
11 files changed
+106 -42

No files matched your search

+13
View File
@@ -4,6 +4,7 @@
#include <array>
#include <iostream>
#include <map>
#include <sstream>
#include <thread>
#include <zlib.h>
@@ -86,3 +87,15 @@ std::string ThreadName() {
void RegisterThread(const std::string str) {
threadNameMap[std::this_thread::get_id()] = str;
}
void LogChatMessage(const std::string& name, int id, const std::string& msg) {
std::stringstream ss;
ss << "[CHAT] ";
if (id != -1) {
ss << "(" << id << ") <" << name << ">";
} else {
ss << name << "";
}
ss << msg;
Application::Console().Write(ss.str());
}