diff --git a/RetroFE/Source/Lua/LuaLog.cpp b/RetroFE/Source/Lua/LuaLog.cpp new file mode 100644 index 0000000..ae6e99d --- /dev/null +++ b/RetroFE/Source/Lua/LuaLog.cpp @@ -0,0 +1,48 @@ +#include "LuaLog.h" +#include "../Utility/Log.h" +#include + +int LuaLog::debug(lua_State *l) +{ + std::string message = luaL_checkstring(l, 1); + + Logger::write(Logger::ZONE_DEBUG, "Script", message) + + return 0; +} + +int LuaLog::info(lua_State *l) +{ + std::string message = luaL_checkstring(l, 1); + + Logger::write(Logger::ZONE_INFO, "Script", message) + + return 0; +} + +int LuaLog::warning(lua_State *l) +{ + std::string message = luaL_checkstring(l, 1); + + Logger::write(Logger::ZONE_WARNING, "Script", message) + + return 0; +} + +int LuaLog::notice(lua_State *l) +{ + std::string message = luaL_checkstring(l, 1); + + Logger::write(Logger::ZONE_NOTICE, "Script", message) + + return 0; +} + +int LuaLog::error(lua_State *l) +{ + std::string message = luaL_checkstring(l, 1); + + Logger::write(Logger::ZONE_ERROR, "Script", message) + + return 0; +} \ No newline at end of file