mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-21 03:36:06 +00:00
Clean up and start work on Epiphany plugin
This commit is contained in:
parent
75359e2b83
commit
dd4d542d7e
3 changed files with 71 additions and 17 deletions
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue