adding transformations

This commit is contained in:
2024-11-13 12:17:59 +01:00
parent eaf5be3061
commit e29ea92202
18 changed files with 141 additions and 130 deletions

View File

@@ -12,10 +12,6 @@ namespace mlx
};
}
std::uint32_t Logs::s_nesting = 0;
constexpr int LOGS_TABS_WIDTH = 4;
void Logs::Report(LogType type, std::string message)
{
Report(type, 0, {}, {}, std::move(message));
@@ -42,14 +38,7 @@ namespace mlx
switch(type)
{
case LogType::Debug:
{
std::cout << Ansi::blue << "[MLX Debug] " << Ansi::def << std::flush;
std::printf("%*s", s_nesting * LOGS_TABS_WIDTH, "");
std::fflush(stdout);
std::cout << code_infos << message << std::endl;
break;
}
case LogType::Debug: std::cout << Ansi::blue << "[MLX Debug] " << Ansi::def << code_infos << message << std::endl; break;
case LogType::Message: std::cout << Ansi::blue << "[MLX Message] " << Ansi::def << code_infos << message << '\n'; break;
case LogType::Warning: std::cout << Ansi::magenta << "[MLX Warning] " << Ansi::def << code_infos << message << '\n'; break;
case LogType::Error: std::cerr << Ansi::red << "[MLX Error] " << Ansi::def << code_infos << message << '\n'; break;
@@ -63,15 +52,4 @@ namespace mlx
EventBus::Send("__MlxApplication", Internal::FatalErrorEvent{});
}
}
void Logs::BeginSection()
{
s_nesting++;
}
void Logs::EndSection()
{
if(s_nesting > 0)
s_nesting--;
}
}