This commit is contained in:
jomjol
2020-12-22 08:08:07 +01:00
parent f5c28107d4
commit b418525b3b
39 changed files with 1173 additions and 501 deletions

View File

@@ -19,7 +19,7 @@ void ClassLogFile::WriteToDedicatedFile(std::string _fn, std::string info, bool
return;
}
pFile = OpenFileAndWait(_fn.c_str(), "a+");
pFile = OpenFileAndWait(_fn.c_str(), "a");
if (pFile!=NULL) {
if (_time)
@@ -80,12 +80,12 @@ std::string ClassLogFile::GetCurrentFileName()
{
time_t rawtime;
struct tm* timeinfo;
char buffer[30];
char buffer[60];
time(&rawtime);
timeinfo = localtime(&rawtime);
strftime(buffer, 30, logfile.c_str(), timeinfo);
strftime(buffer, 60, logfile.c_str(), timeinfo);
std::string logpath = logroot + "/" + buffer;
return logpath;