Clean up and start work on Epiphany plugin

This commit is contained in:
Lucien Greathouse
2018-12-03 13:54:54 -08:00
parent 75359e2b83
commit dd4d542d7e
3 changed files with 71 additions and 17 deletions

21
plugin/src/Logging.lua Normal file
View File

@@ -0,0 +1,21 @@
local enabledByTest = false
local function isEnabled()
return _G.ROJO_LOG or enabledByTest
end
local Logging = {}
function Logging.info(template, ...)
if isEnabled() then
print("[Rojo] " .. template:format(...))
end
end
function Logging.warn(template, ...)
if isEnabled() then
warn("[Rojo] " .. template:format(...))
end
end
return Logging