1
0
mirror of https://github.com/GOSTSec/poolserver synced 2025-01-27 23:14:22 +00:00

Fix logfile

This commit is contained in:
Intel 2014-05-05 17:09:03 -04:00
parent 4de65da79a
commit d097a4b49e

View File

@ -64,7 +64,7 @@ void Log::Debug(LogType type, const char * str, ...)
void Log::OpenLogFile(std::string path)
{
if (!logfile) {
if (!logfile.is_open()) {
logFileLoc = path + "/server-" + Util::Date("%Y%m%d-%H%M%S") + ".log";
logfile.open(logFileLoc.c_str());
}
@ -111,7 +111,7 @@ void Log::Write(LogLevel level, LogType type, std::string msg)
void Log::AppendFile(std::string msg)
{
if (!logfile)
if (!logfile.is_open())
return;
logfile << msg << std::endl;