diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/account-server/main-account.cpp | 2 | ||||
-rw-r--r-- | src/game-server/main-game.cpp | 2 | ||||
-rw-r--r-- | src/utils/logger.cpp | 3 |
3 files changed, 4 insertions, 3 deletions
diff --git a/src/account-server/main-account.cpp b/src/account-server/main-account.cpp index 159df4c6..af6e99fb 100644 --- a/src/account-server/main-account.cpp +++ b/src/account-server/main-account.cpp @@ -146,7 +146,7 @@ static void initialize() PHYSFS_init(""); // Initialize the logger. - Logger::setLogFile(logFile); + Logger::setLogFile(logFile, true); // Write the messages to both the screen and the log file. Logger::setTeeMode( diff --git a/src/game-server/main-game.cpp b/src/game-server/main-game.cpp index 8cd41699..cc968c13 100644 --- a/src/game-server/main-game.cpp +++ b/src/game-server/main-game.cpp @@ -165,7 +165,7 @@ static void initializeServer() PHYSFS_init(""); // Initialize the logger. - Logger::setLogFile(logFile); + Logger::setLogFile(logFile, true); // Write the messages to both the screen and the log file. Logger::setTeeMode(Configuration::getBoolValue("log_gameToStandardOutput", diff --git a/src/utils/logger.cpp b/src/utils/logger.cpp index 6ad008c9..2053c9a8 100644 --- a/src/utils/logger.cpp +++ b/src/utils/logger.cpp @@ -150,7 +150,8 @@ void Logger::setLogFile(const std::string &logFile, bool append) // Open the file for output // and remove the former file contents depending on the append flag. mLogFile.open(logFile.c_str(), - append ? std::ios::ate : std::ios::trunc); + append ? std::ios::app : std::ios::trunc); + mFilename = logFile; mLastCallDate = getCurrentDate(); |