change _debug to _syslog

This commit is contained in:
kepler155c@gmail.com
2019-05-03 15:30:37 -04:00
parent 074e0742d5
commit 731fc2c761
31 changed files with 264 additions and 204 deletions

View File

@@ -120,7 +120,7 @@ function swarm:onRemove(member, status, message)
member.snmp = nil
end
if not status then
_G._debug(message)
_G._syslog(message)
end
end

View File

@@ -13,9 +13,9 @@ mon.clear()
mon.setTextScale(.5)
mon.setCursorPos(1, 1)
local oldDebug = _G._debug
local oldDebug = _G._syslog
_G._debug = function(...)
_G._syslog = function(...)
local oldTerm = term.redirect(mon)
Util.print(...)
term.redirect(oldTerm)
@@ -30,4 +30,4 @@ repeat
end
until e == 'terminate'
_G._debug = oldDebug
_G._syslog = oldDebug