]> granicus.if.org Git - icinga2/commitdiff
Filelogger must not truncate log file, but append its stream.
authorMichael Friedrich <michael.friedrich@netways.de>
Tue, 14 Jan 2014 16:25:05 +0000 (17:25 +0100)
committerMichael Friedrich <michael.friedrich@netways.de>
Tue, 14 Jan 2014 16:25:05 +0000 (17:25 +0100)
Refs #5448

lib/base/filelogger.cpp

index c4741f677ab11a309e315534fc94bc9485dabc5a..af88ae74ab67e8814e35c27b4553c2fd7ba7b80e 100644 (file)
@@ -37,7 +37,7 @@ void FileLogger::Start()
        String path = GetPath();
 
        try {
-               stream->open(path.CStr(), std::fstream::out | std::fstream::trunc);
+               stream->open(path.CStr(), std::fstream::app | std::fstream::out);
 
                if (!stream->good())
                        BOOST_THROW_EXCEPTION(std::runtime_error("Could not open logfile '" + path + "'"));