Made common a project

This commit is contained in:
Pasha Bibko
2025-05-05 16:45:34 +01:00
parent 616ed1ca21
commit c64a2c692c
27 changed files with 337 additions and 146 deletions

23
Common/inc/Logger.h Normal file
View File

@@ -0,0 +1,23 @@
namespace LX
{
template<typename... Args>
inline void SafeLog(std::ofstream* log, Args... args)
{
if (log != nullptr)
{
(*log << ... << args);
(*log << '\n');
}
}
inline void SafeFlush(std::ofstream* log)
{
if (log != nullptr)
{
log->flush();
}
}
// Gives a standard way to mark a change between different sections within the log output //
constexpr const char* LOG_BREAK = "\n-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n";
}