Closed ManiacTwister closed 5 years ago
Hi, thanks for reporting this and and an even bigger thanks to already providing a PR :) The current behaviour is in fact not great.
According to the Logrus documentation Log.Panic
calls the panic()
function to gracefully shutdown stuff after logging the error. Wouldn't it be more sensible to just use Log.Error()
in the cases where we receive malformed json?
Yeah makes sense :D Changed it to Log.Error
Hi @ManiacTwister I fixed some issues with my branches and now this PR should be clean again if you rebase against development. Then I will be happy to merge it :)
@fleaz rebased, looks good now
Awesome. Thanks :)
In the gitlabmodule
log.Fatal
is called when the module receives invalid/unexpected json data, which leads to program termination with exit status 1 - therefore it is possible to remotely "crash" CptHook. I thinkLog.Panic
is more appropriate here?