mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-01 00:15:51 +00:00
Don't crash on logrotate.
This commit is contained in:
@@ -286,10 +286,13 @@ void Log::setLogFile (boost::filesystem::path const& path)
|
|||||||
|
|
||||||
outStream = newStream;
|
outStream = newStream;
|
||||||
|
|
||||||
if (pathToLog != NULL)
|
if (pathToLog != &path)
|
||||||
delete pathToLog;
|
{
|
||||||
|
if (pathToLog != NULL)
|
||||||
|
delete pathToLog;
|
||||||
|
|
||||||
pathToLog = new boost::filesystem::path (path);
|
pathToLog = new boost::filesystem::path (path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LogPartition::setSeverity (const std::string& partition, LogSeverity severity)
|
bool LogPartition::setSeverity (const std::string& partition, LogSeverity severity)
|
||||||
|
|||||||
Reference in New Issue
Block a user