Merge pull request #899 from Pax1601/main

Main
This commit is contained in:
Pax1601 2024-07-22 18:35:09 +02:00 committed by GitHub
commit 05c7d8166b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -31,6 +31,7 @@ void Logger::setDirectory(string newDirPath)
void Logger::Clear()
{
lock_guard<mutex> guard(mutexLock);
try {
m_Logfile.open((m_dirPath + m_sFileName).c_str(), ios::out | std::ios::trunc);
}
@ -38,6 +39,8 @@ void Logger::Clear()
std::filesystem::path m_dirPath = std::filesystem::temp_directory_path();
m_Logfile.open((m_dirPath.string() + m_sFileName).c_str(), ios::out | std::ios::trunc);
}
m_Logfile << "Creating a new log instance\n";
m_pThis->Close();
}
void Logger::Open()