OC-PsychOS/modules/debug/log.lua

14 lines
299 B
Lua
Raw Normal View History

2017-07-30 19:12:10 +10:00
if component then
_G.Log = ""
function log(...)
for k,v in ipairs({...}) do
2017-07-31 09:26:58 +10:00
if component.list("ocemu")() then
component.invoke(component.list("ocemu")(),"log",v)
end
2017-09-04 02:04:05 +10:00
Log=Log.."["..tostring(computer.uptime()).."] "..tostring(v).."\n"
2017-07-30 19:12:10 +10:00
end
end
print=log
else log = print
end