a
This commit is contained in:
parent
f4d437cff5
commit
1e70338535
@ -3,6 +3,11 @@ function clearDisplay()
|
|||||||
term.setCursorPos(1,1)
|
term.setCursorPos(1,1)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function getCurrentTime()
|
||||||
|
local time = textutils.formatTime(os.time("local")+2, true)
|
||||||
|
return time
|
||||||
|
end
|
||||||
|
|
||||||
function writeToFile(file, content)
|
function writeToFile(file, content)
|
||||||
file = fs.open(file, "w")
|
file = fs.open(file, "w")
|
||||||
file.write(content)
|
file.write(content)
|
||||||
|
@ -48,7 +48,7 @@ function sendLog(to, targetPath, logMsg)
|
|||||||
local payloadTable = {}
|
local payloadTable = {}
|
||||||
|
|
||||||
payloadTable[0] = targetPath
|
payloadTable[0] = targetPath
|
||||||
payloadTable[1] = logMsg
|
payloadTable[1] = basic.getCurrentTime .. ": " .. logMsg
|
||||||
|
|
||||||
sendMessage(to, "log", payloadTable)
|
sendMessage(to, "log", payloadTable)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user