adding nesting to debug logs

This commit is contained in:
2024-11-05 12:49:21 +01:00
parent 4ae7bd0420
commit eaf5be3061
16 changed files with 42 additions and 9 deletions

View File

@@ -30,11 +30,16 @@ namespace mlx
static void Report(LogType type, std::string message);
static void Report(LogType type, unsigned int line, std::string_view file, std::string_view function, std::string message);
static void BeginSection();
static void EndSection();
~Logs() = delete;
private:
static std::uint32_t s_nesting;
};
#if defined(DEBUG)
#ifdef DEBUG
template<typename... Args>
void Assert(bool cond, unsigned int line, std::string_view file, std::string_view function, std::string message, const Args&... args);
#else

View File

@@ -102,7 +102,7 @@ namespace mlx
}
}
#if defined(DEBUG)
#ifdef DEBUG
template<typename... Args>
void Assert(bool cond, unsigned int line, std::string_view file, std::string_view function, std::string message, const Args&... args)
{