From: Alexander A. Klimov Date: Wed, 17 Apr 2019 12:18:20 +0000 (+0200) Subject: Rotate replay log on shutdown, not on startup X-Git-Tag: v2.11.0-rc1~143^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f44e847717d272833dfc185ef2117390ef5a9f89;p=icinga2 Rotate replay log on shutdown, not on startup --- diff --git a/lib/remote/apilistener.cpp b/lib/remote/apilistener.cpp index 4d788610f..8aea09159 100644 --- a/lib/remote/apilistener.cpp +++ b/lib/remote/apilistener.cpp @@ -229,7 +229,6 @@ void ApiListener::Start(bool runtimeCreated) { boost::mutex::scoped_lock lock(m_LogLock); - RotateLogFile(); OpenLogFile(); } @@ -280,6 +279,7 @@ void ApiListener::Stop(bool runtimeDeleted) { boost::mutex::scoped_lock lock(m_LogLock); CloseLogFile(); + RotateLogFile(); } RemoveStatusFile();