mirror of https://github.com/Icinga/icinga2.git
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();
|
String path = GetPath();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
stream->open(path.CStr(), std::fstream::out | std::fstream::trunc);
|
stream->open(path.CStr(), std::fstream::app | std::fstream::out);
|
||||||
|
|
||||||
if (!stream->good())
|
if (!stream->good())
|
||||||
BOOST_THROW_EXCEPTION(std::runtime_error("Could not open logfile '" + path + "'"));
|
BOOST_THROW_EXCEPTION(std::runtime_error("Could not open logfile '" + path + "'"));
|
||||||
|
|
Loading…
Reference in New Issue