Merge pull request #1922 from connortechnology/log_no_truncate

change mode of opening log files to append instead of overwrite
This commit is contained in:
Andrew Bauer 2017-06-14 19:02:15 -05:00 committed by GitHub
commit 108be3b05f
1 changed files with 1 additions and 1 deletions

View File

@ -422,7 +422,7 @@ void Logger::logFile( const std::string &logFile ) {
}
void Logger::openFile() {
if ( mLogFile.size() && (mLogFileFP = fopen( mLogFile.c_str() ,"w" )) == (FILE *)NULL ) {
if ( mLogFile.size() && (mLogFileFP = fopen( mLogFile.c_str() ,"a" )) == (FILE *)NULL ) {
mFileLevel = NOLOG;
Fatal( "fopen() for %s, error = %s", mLogFile.c_str(), strerror(errno) );
}