Rework logger

This commit is contained in:
Antoine Pilote
2023-07-21 22:25:17 -04:00
parent 46a531fd7d
commit e4119c0d15
26 changed files with 127 additions and 97 deletions

View File

@@ -25,23 +25,23 @@ namespace Nuake {
case WREN_ERROR_COMPILE:
{
std::string t = std::string(module) + " line " + std::to_string(line) + ": " + msg;
Logger::Log(t, CRITICAL);
Logger::Log(t, "script", CRITICAL);
Engine::ExitPlayMode();
} break;
case WREN_ERROR_STACK_TRACE:
{
std::string t = "Stack trace: " + std::string(module) + " line " + std::to_string(line) + ": " + msg;
Logger::Log(t, CRITICAL);
Logger::Log(t, "script", CRITICAL);
} break;
case WREN_ERROR_RUNTIME:
{
std::string t = "Script Runtime Error: " + std::string(msg);
Logger::Log(t, WARNING);
Logger::Log(t, "script", WARNING);
} break;
default:
{
std::string t = "Script Runtime Error: " + std::string(msg);
Logger::Log(t, CRITICAL);
Logger::Log(t, "script", CRITICAL);
}
break;
}