show log in game

This commit is contained in:
Asuro
2025-03-27 17:36:55 +01:00
parent 24a724a021
commit 2ff08d7258
3 changed files with 47 additions and 2 deletions

View File

@@ -27,5 +27,19 @@ enum class ELogType
Error,
};
namespace LogInternal
{
constexpr int32_t MaxLineSize = 1024;
constexpr int32_t LogHistorySize = 1024;
} // namespace LogInternal
struct LogHistory
{
char LogBuffer[LogInternal::MaxLineSize * LogInternal::LogHistorySize]{0};
int32_t WriteIdx = 0;
int64_t WriteTime[LogInternal::LogHistorySize]{0};
};
void Log(ELogType logType, const char* file, uint32_t line, const char* format, ...);
bool WasLogged(ELogType logType, const char* file, uint32_t line, const char* format);
LogHistory& GetLogHistory();