Use uv_tty for console output and remove legacy winansi.

This commit is contained in:
XMRig 2017-07-23 05:59:57 +03:00
parent b6bf6d9bc9
commit 9665ff15ae
8 changed files with 36 additions and 452 deletions

View file

@ -25,6 +25,9 @@
#define __CONSOLELOG_H__
#include <uv.h>
#include "interfaces/ILogBackend.h"
@ -33,11 +36,15 @@ class ConsoleLog : public ILogBackend
public:
ConsoleLog(bool colors);
void message(int level, const char* fmt, va_list args) override;
void text(const char* fmt, va_list args) override;
void message(int level, const char *fmt, va_list args) override;
void text(const char *fmt, va_list args) override;
private:
void print(char *fmt, va_list args);
bool m_colors;
char m_buf[512];
uv_tty_t m_tty;
};
#endif /* __CONSOLELOG_H__ */