2015-12-23 16:21:03 -05:00
|
|
|
namespace Components
|
|
|
|
{
|
|
|
|
class Logger : public Component
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Logger();
|
2016-08-15 10:40:30 -04:00
|
|
|
~Logger();
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
2015-12-23 16:21:03 -05:00
|
|
|
const char* GetName() { return "Logger"; };
|
2016-08-15 10:40:30 -04:00
|
|
|
#endif
|
2016-06-03 18:06:07 -04:00
|
|
|
|
|
|
|
static void MessagePrint(int channel, std::string message);
|
|
|
|
static void Print(int channel, const char* message, ...);
|
2015-12-23 16:21:03 -05:00
|
|
|
static void Print(const char* message, ...);
|
2016-06-03 18:06:07 -04:00
|
|
|
static void ErrorPrint(int error, std::string message);
|
2015-12-23 16:21:03 -05:00
|
|
|
static void Error(const char* message, ...);
|
2016-06-03 18:06:07 -04:00
|
|
|
static void Error(int error, const char* message, ...);
|
2015-12-23 16:21:03 -05:00
|
|
|
static void SoftError(const char* message, ...);
|
|
|
|
static bool IsConsoleReady();
|
2015-12-31 07:37:25 -05:00
|
|
|
|
2016-02-17 16:21:42 -05:00
|
|
|
static void PipeOutput(void(*callback)(std::string));
|
2016-09-01 15:52:00 -04:00
|
|
|
static bool validInt(char* str);
|
|
|
|
static const DWORD fsBuildOSPathForThreadHookLoc = 0x642139;
|
|
|
|
//static const DWORD fsBuildOSPathForThreadHookLocRet = 0x64213F;
|
|
|
|
Game::cmd_function_t sv_log_add;
|
|
|
|
Game::cmd_function_t sv_log_add2;
|
|
|
|
|
|
|
|
Game::cmd_function_t sv_log_del;
|
|
|
|
Game::cmd_function_t sv_log_del2;
|
|
|
|
|
|
|
|
Game::cmd_function_t sv_log_list;
|
|
|
|
Game::cmd_function_t sv_log_list2;
|
|
|
|
|
|
|
|
Game::cmd_function_t sv_glog_add;
|
|
|
|
Game::cmd_function_t sv_glog_add2;
|
|
|
|
|
|
|
|
Game::cmd_function_t sv_glog_del;
|
|
|
|
Game::cmd_function_t sv_glog_del2;
|
|
|
|
|
|
|
|
Game::cmd_function_t sv_glog_list;
|
|
|
|
Game::cmd_function_t sv_glog_list2;
|
2016-09-01 15:54:46 -04:00
|
|
|
static void PipeOutputStub(std::string message);
|
2015-12-31 07:37:25 -05:00
|
|
|
private:
|
|
|
|
static std::mutex MessageMutex;
|
|
|
|
static std::vector<std::string> MessageQueue;
|
2016-09-01 15:52:00 -04:00
|
|
|
static std::vector<Game::netadr_t> addresses;
|
|
|
|
static std::vector<Game::netadr_t> gaddresses;
|
2016-02-17 16:21:42 -05:00
|
|
|
static void(*PipeCallback)(std::string);
|
2015-12-31 07:37:25 -05:00
|
|
|
|
2016-09-01 15:52:00 -04:00
|
|
|
|
2015-12-31 07:37:25 -05:00
|
|
|
static void Frame();
|
2016-02-17 16:21:42 -05:00
|
|
|
static void PrintMessageStub();
|
|
|
|
static void PrintMessagePipe(const char* data);
|
2015-12-31 07:37:25 -05:00
|
|
|
static void EnqueueMessage(std::string message);
|
2016-06-03 18:06:07 -04:00
|
|
|
|
|
|
|
static std::string Format(const char** message);
|
2016-09-01 15:52:00 -04:00
|
|
|
|
|
|
|
//Logging over network stuff
|
|
|
|
static void FS_BuildOSPathForThreadHookFunc();
|
|
|
|
static void FS_BuildOSPathForThreadHookTest();
|
|
|
|
static void SV_GLog_Add_f();
|
|
|
|
static void SV_Log_Add_f();
|
|
|
|
static void SV_GLog_Del_f();
|
|
|
|
static void SV_Log_Del_f();
|
|
|
|
static void SV_GLog_List_f();
|
|
|
|
static void SV_Log_List_f();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-12-23 16:21:03 -05:00
|
|
|
};
|
|
|
|
}
|