mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Complete the log rotate even if we can't rename the existing log file.
This commit is contained in:
@@ -109,7 +109,15 @@ std::string Log::rotateLog(void)
|
||||
} while (boost::filesystem::exists(boost::filesystem::path(abs_new_path_str)));
|
||||
|
||||
outStream->close();
|
||||
boost::filesystem::rename(abs_path, boost::filesystem::path(abs_new_path_str));
|
||||
|
||||
try
|
||||
{
|
||||
boost::filesystem::rename(abs_path, boost::filesystem::path(abs_new_path_str));
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
// unable to rename existing log file
|
||||
}
|
||||
|
||||
setLogFile(*pathToLog);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user