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

28 lines
676 B
C++
Raw Normal View History

2015-12-23 16:21:03 -05:00
namespace Components
{
class Logger : public Component
{
public:
Logger();
~Logger();
2015-12-23 16:21:03 -05:00
const char* GetName() { return "Logger"; };
static void Print(const char* message, ...);
static void Error(const char* message, ...);
static void SoftError(const char* message, ...);
static bool IsConsoleReady();
2016-02-17 16:21:42 -05:00
static void PipeOutput(void(*callback)(std::string));
private:
static std::mutex MessageMutex;
static std::vector<std::string> MessageQueue;
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);
2015-12-23 16:21:03 -05:00
};
}