Removed uv_try_write for console log.

This commit is contained in:
XMRig 2019-10-06 11:03:01 +07:00
parent 59b62dcb77
commit 8af1075c98
3 changed files with 13 additions and 36 deletions

View file

@ -31,10 +31,10 @@
#include <algorithm>
#include <cstring>
#include <ctime>
#include <mutex>
#include <string.h>
#include <string>
#include <time.h>
#include <uv.h>
#include <vector>
@ -42,6 +42,7 @@
#include "base/io/log/Log.h"
#include "base/kernel/interfaces/ILogBackend.h"
#include "base/tools/Chrono.h"
#include "base/tools/Object.h"
namespace xmrig {
@ -67,10 +68,10 @@ static const char *colors_map[] = {
class LogPrivate
{
public:
inline LogPrivate() :
m_buf()
{
}
XMRIG_DISABLE_COPY_MOVE(LogPrivate)
LogPrivate() = default;
inline ~LogPrivate()
@ -134,7 +135,7 @@ private:
const uint64_t ms = Chrono::currentMSecsSinceEpoch();
time_t now = ms / 1000;
tm stime;
tm stime{};
# ifdef _WIN32
localtime_s(&stime, &now);
@ -188,7 +189,7 @@ private:
}
char m_buf[4096];
char m_buf[4096]{};
std::mutex m_mutex;
std::vector<ILogBackend*> m_backends;
};