1
0
mirror of https://github.com/kepler155c/opus synced 2025-12-17 05:38:07 +00:00

change _debug to _syslog

This commit is contained in:
kepler155c@gmail.com
2019-05-03 15:30:09 -04:00
parent 59552d4217
commit c44dc765da
6 changed files with 22 additions and 26 deletions

View File

@@ -28,19 +28,13 @@ local focusedRoutineEvents = Util.transpose {
'paste', 'terminate',
}
_G._debug = function(pattern, ...)
_G._syslog = function(pattern, ...)
local oldTerm = term.redirect(kernel.window)
kernel.window.scrollBottom()
Util.print(pattern, ...)
term.redirect(oldTerm)
end
if not _G.debug then -- don't clobber lua debugger
function _G.debug(...)
_G._debug(...)
end
end
-- any function that runs in a kernel hook does not run in
-- a separate coroutine or have a window. an error in a hook
-- function will crash the system.