iw4x-client/src/Components/Modules/Logger.hpp

75 lines
2.1 KiB
C++
Raw Normal View History

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();
2016-02-17 16:21:42 -05:00
static void PipeOutput(void(*callback)(std::string));
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;
static void PipeOutputStub(std::string message);
private:
static std::mutex MessageMutex;
static std::vector<std::string> MessageQueue;
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);
static void Frame();
2016-02-17 16:21:42 -05:00
static void PrintMessageStub();
static void PrintMessagePipe(const char* data);
static void EnqueueMessage(std::string message);
2016-06-03 18:06:07 -04:00
static std::string Format(const char** message);
//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
};
}