feat(Logging): add support new logging (#17)

This commit is contained in:
Kargatum
2022-01-28 00:05:21 +07:00
committed by GitHub
parent 5ead47b733
commit ee4e38fa04
5 changed files with 28 additions and 28 deletions

View File

@@ -80,7 +80,7 @@ void ElunaInstanceAI::Load(const char* data)
}
else
{
ELUNA_LOG_ERROR("Error while loading instance data: Expected data to be a table (type 5), got type %d instead", lua_type(L, -1));
ELUNA_LOG_ERROR("Error while loading instance data: Expected data to be a table (type 5), got type {} instead", lua_type(L, -1));
lua_pop(L, 1);
// Stack: (empty)
@@ -92,7 +92,7 @@ void ElunaInstanceAI::Load(const char* data)
else
{
// Stack: error_message
ELUNA_LOG_ERROR("Error while parsing instance data with lua-marshal: %s", lua_tostring(L, -1));
ELUNA_LOG_ERROR("Error while parsing instance data with lua-marshal: {}", lua_tostring(L, -1));
lua_pop(L, 1);
// Stack: (empty)
@@ -135,7 +135,7 @@ const char* ElunaInstanceAI::Save() const
if (lua_pcall(L, 1, 1, 0) != 0)
{
// Stack: error_message
ELUNA_LOG_ERROR("Error while saving: %s", lua_tostring(L, -1));
ELUNA_LOG_ERROR("Error while saving: {}", lua_tostring(L, -1));
lua_pop(L, 1);
return NULL;
}