mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-23 13:45:04 +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();
|
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…
x
Reference in New Issue
Block a user