forked from rojo-rbx/rojo
Clean up and start work on Epiphany plugin
This commit is contained in:
21
plugin/src/Logging.lua
Normal file
21
plugin/src/Logging.lua
Normal 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
|
||||
Reference in New Issue
Block a user