Rolling Update 2020-11-21

This commit is contained in:
jomjol
2020-11-21 22:47:43 +01:00
parent 288910e67e
commit eb47d5139f
11 changed files with 626 additions and 5 deletions

View File

@@ -75,6 +75,21 @@ void ClassLogFile::WriteToFile(std::string info, bool _time)
WriteToDedicatedFile(logpath, info, _time);
}
std::string ClassLogFile::GetCurrentFileName()
{
time_t rawtime;
struct tm* timeinfo;
char buffer[30];
time(&rawtime);
timeinfo = localtime(&rawtime);
strftime(buffer, 30, logfile.c_str(), timeinfo);
std::string logpath = logroot + "/" + buffer;
return logpath;
}
void ClassLogFile::RemoveOld()
{
if (retentionInDays == 0) {