From d097a4b49e7d65bbffafb964a2667d4ac777436a Mon Sep 17 00:00:00 2001 From: Intel Date: Mon, 5 May 2014 17:09:03 -0400 Subject: [PATCH] Fix logfile --- src/server/shared/Logging/Log.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/shared/Logging/Log.cpp b/src/server/shared/Logging/Log.cpp index 7cc0c1c..e41aebc 100644 --- a/src/server/shared/Logging/Log.cpp +++ b/src/server/shared/Logging/Log.cpp @@ -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;