mirror of
https://github.com/SChernykh/p2pool.git
synced 2024-11-16 15:57:39 +00:00
Log: fixed broken output redirection on Windows
This commit is contained in:
parent
f7b90b3808
commit
e92ce0a5f3
1 changed files with 3 additions and 5 deletions
|
@ -245,12 +245,7 @@ private:
|
|||
strip_colors(p, size);
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
DWORD k;
|
||||
WriteConsole((severity == 1) ? hStdOut : hStdErr, p, size, &k, nullptr);
|
||||
#else
|
||||
fwrite(p, 1, size, (severity == 1) ? stdout : stderr);
|
||||
#endif
|
||||
|
||||
if (m_logFile.is_open()) {
|
||||
if (c) {
|
||||
|
@ -289,6 +284,9 @@ private:
|
|||
m_logFile.open(log_file_name, std::ios::app | std::ios::binary);
|
||||
}
|
||||
}
|
||||
|
||||
fflush(stdout);
|
||||
fflush(stderr);
|
||||
} while (1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue