mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
Filelogger must not truncate log file, but append its stream.
Refs #5448
This commit is contained in:
parent
87ba0ea3ab
commit
815a34a535
@ -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 + "'"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user