1
0

Update TestLuaRocks.lua (#3903)

Changed LOG to LOGWARNING when a library was not found
Made log text more descriptive
Removed unnecessary semicolons
This commit is contained in:
William 'psyFi' Hatcher 2017-08-13 06:29:24 -05:00 committed by Tiger Wang
parent 83ff815d1e
commit ee14344c05

View File

@ -20,14 +20,14 @@ local http = require("socket.http");
LOGINFO("Trying to download a webpage..."); LOGINFO("Trying to download a webpage...")
local body, code, headers = http.request('https://forum.cuberite.org/'); local body, code, headers = http.request('https://forum.cuberite.org/')
LOG("code: " .. tostring(code)); LOG("code: " .. tostring(code))
LOG("headers: "); LOG("headers: ")
for k, v in pairs(headers or {}) do for k, v in pairs(headers or {}) do
LOG(" " .. k .. ": " .. v); LOG(" " .. k .. ": " .. v)
end end
LOG("body length: " .. string.len(body)); LOG("body length: " .. string.len(body))
@ -35,15 +35,15 @@ LOG("body length: " .. string.len(body));
function Initialize(a_Plugin) function Initialize(a_Plugin)
if (socket == nil) then if (socket == nil) then
LOG("LuaSocket not found"); LOGWARNING("LuaSocket not found")
else else
LOG("LuaSocket loaded"); LOG("LuaSocket loaded")
end end
if (log30 == nil) then if (log30 == nil) then
LOG("30log not found"); LOGWARNING("30log not found")
else else
LOG("30log loaded"); LOG("30log loaded")
end end
LOGINFO("Preventing plugin load so that it may be requested again from the webadmin."); LOGINFO("Reload plugin from console or webadmin to rerun tests.")
return false; return false
end end