| 48 | } |
| 49 | |
| 50 | void CAssertionLogger::Dump() |
| 51 | { |
| 52 | char aAssertLogFile[IO_MAX_PATH_LENGTH]; |
| 53 | char aDate[64]; |
| 54 | str_timestamp(aDate, sizeof(aDate)); |
| 55 | str_format(aAssertLogFile, std::size(aAssertLogFile), "%s%s_assert_log_%s_%d.txt", m_aAssertLogPath, m_aGameName, aDate, process_id()); |
| 56 | const CLockScope LockScope(m_DbgMessageMutex); |
| 57 | IOHANDLE FileHandle = io_open(aAssertLogFile, IOFLAG_WRITE); |
| 58 | if(FileHandle) |
| 59 | { |
| 60 | auto *pIt = m_DbgMessages.First(); |
| 61 | while(pIt) |
| 62 | { |
| 63 | io_write(FileHandle, pIt->m_aMessage, str_length(pIt->m_aMessage)); |
| 64 | io_write(FileHandle, "\n", 1); |
| 65 | |
| 66 | pIt = m_DbgMessages.Next(pIt); |
| 67 | } |
| 68 | |
| 69 | io_sync(FileHandle); |
| 70 | io_close(FileHandle); |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | CAssertionLogger::CAssertionLogger(const char *pAssertLogPath, const char *pGameName) |
| 75 | { |
nothing calls this directly
no test coverage detected