Log is truncated and no longer appended, decrease camera link status check update

This commit is contained in:
Pax1601
2024-07-22 15:31:55 +02:00
parent 274c16851e
commit a897401975
3 changed files with 5 additions and 4 deletions

View File

@@ -31,11 +31,11 @@ void Logger::setDirectory(string newDirPath)
void Logger::Open()
{
try {
m_Logfile.open((m_dirPath + m_sFileName).c_str(), ios::out | ios::app);
m_Logfile.open((m_dirPath + m_sFileName).c_str(), ios::out | std::ios::trunc);
}
catch (...) {
std::filesystem::path m_dirPath = std::filesystem::temp_directory_path();
m_Logfile.open((m_dirPath.string() + m_sFileName).c_str(), ios::out | ios::app);
m_Logfile.open((m_dirPath.string() + m_sFileName).c_str(), ios::out | std::ios::trunc);
}
}