mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-07 12:06:58 +03:00
Rolling Update 2020-11-21
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user