diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2010-10-20 00:21:42 +0200 |
---|---|---|
committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2010-10-20 00:24:27 +0200 |
commit | f2515c86fb3e2f7718441187ddc9effe82abbfcd (patch) | |
tree | 3a1a00d825f7356691d55cb888d0650e322be3bf /src/utils | |
parent | 00415834dce15837f0b96e8f8cb9857d35731224 (diff) | |
download | manaserv-f2515c86fb3e2f7718441187ddc9effe82abbfcd.tar.gz manaserv-f2515c86fb3e2f7718441187ddc9effe82abbfcd.tar.xz manaserv-f2515c86fb3e2f7718441187ddc9effe82abbfcd.zip |
Fixed the append behaviour of logger::setLogFile().
Also made both servers appends on the main log at start
if they aren't empty.
This permits not to lose the previous logs
when quicky restarting the servers.
Trivial fix.
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/logger.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/utils/logger.cpp b/src/utils/logger.cpp index 6ad008c..2053c9a 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(); |