| 13 | static auto prevString = std::string(); |
| 14 | |
| 15 | static std::string GetTimestampString() |
| 16 | { |
| 17 | auto now = std::chrono::system_clock::now(); |
| 18 | auto t = std::chrono::system_clock::to_time_t(now); |
| 19 | |
| 20 | std::tm tmBuf{}; |
| 21 | localtime_s(&tmBuf, &t); |
| 22 | |
| 23 | std::ostringstream oss; |
| 24 | oss << std::put_time(&tmBuf, "%Y-%m-%d_%H-%M-%S"); |
| 25 | return oss.str(); |
| 26 | } |
| 27 | |
| 28 | static void CleanupOldLogs(const std::filesystem::path& logDir) |
| 29 | { |
no test coverage detected