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

@@ -83,7 +83,7 @@ namespace Nuake {
const std::string& prefabPath = wrenGetSlotString(vm, 1);
if (prefabPath.empty())
{
Logger::Log("[Scripting] Cannot add prefab with an empty path.", CRITICAL);
Logger::Log("Cannot add prefab with an empty path.", "script", CRITICAL);
wrenSetSlotDouble(vm, 0, -1); // -1 is an empty entity.
return;
}
@@ -91,14 +91,14 @@ namespace Nuake {
const std::string& prefabName = wrenGetSlotString(vm, 1);
if (prefabName.empty())
{
Logger::Log("[Scripting] Cannot add prefab with an empty name.", CRITICAL);
Logger::Log("Cannot add prefab with an empty name.", "script", CRITICAL);
wrenSetSlotDouble(vm, 0, -1); // -1 is an empty entity.
return;
}
if (!FileSystem::FileExists(prefabPath))
{
Logger::Log("[Scripting] Cannot add prefab. File not found: " + prefabPath, CRITICAL);
Logger::Log("Cannot add prefab. File not found: " + prefabPath, "script", CRITICAL);
return;
}