OC-PsychOS/modules/debug/log.lua

14 lines
299 B
Lua

if component then
_G.Log = ""
function log(...)
for k,v in ipairs({...}) do
if component.list("ocemu")() then
component.invoke(component.list("ocemu")(),"log",v)
end
Log=Log.."["..tostring(computer.uptime()).."] "..tostring(v).."\n"
end
end
print=log
else log = print
end