diff --git a/scripting/eventloop/eventloop.go b/scripting/eventloop/eventloop.go index 59bfa7d..0158ec9 100644 --- a/scripting/eventloop/eventloop.go +++ b/scripting/eventloop/eventloop.go @@ -1,9 +1,9 @@ package eventloop import ( + log "github.com/sirupsen/logrus" lua "github.com/yuin/gopher-lua" luar "layeh.com/gopher-luar" - "log" "sync" "time" ) @@ -91,7 +91,6 @@ func (loop *EventLoop) schedule(repeating bool) int { if fn, ok := loop.vm.Get(1).(*lua.LFunction); ok { delay := loop.vm.CheckInt(2) - log.Println("Delay:", delay) var args []lua.LValue if loop.vm.GetTop() > 2 { args = make([]lua.LValue, loop.vm.GetTop()-2) @@ -110,7 +109,7 @@ func (loop *EventLoop) schedule(repeating bool) int { err := loop.vm.PCall(len(args), 0, fn) if err != nil { - log.Fatalln("Error calling function:", err) + log.WithError(err).Warning("Error calling lua function for timer") } } loop.jobCount++