mirror of https://github.com/Icinga/icinga2.git
Write also /var/lib/icinga2/api/zones-stage-startup-last-failed.log
in addition to /var/lib/icinga2/api/zones-stage-startup.log to prevent the next success to overwrite the last failure.
This commit is contained in:
parent
ce6d1b8961
commit
08a23f4035
|
@ -645,10 +645,15 @@ void ApiListener::TryActivateZonesStage(const std::vector<String>& relativePaths
|
|||
return;
|
||||
}
|
||||
|
||||
String failedLogFile = apiDir + "/zones-stage-startup-last-failed.log";
|
||||
std::ofstream fpFailedLog(failedLogFile.CStr(), std::ofstream::out | std::ostream::binary | std::ostream::trunc);
|
||||
fpFailedLog << pr.Output;
|
||||
fpFailedLog.close();
|
||||
|
||||
// Error case.
|
||||
Log(LogCritical, "ApiListener")
|
||||
<< "Config validation failed for staged cluster config sync in '" << apiZonesStageDir
|
||||
<< "'. Aborting. Logs: '" << logFile << "'";
|
||||
<< "'. Aborting. Logs: '" << failedLogFile << "'";
|
||||
|
||||
ApiListener::Ptr listener = ApiListener::GetInstance();
|
||||
|
||||
|
|
Loading…
Reference in New Issue