<div dir="ltr">Hey Devs!<div><br></div><div>This luajit feature is amazing, and has some very exciting possibilities! One challenge though is the lack of visibility when testing out new features.</div><div><br></div><div>Does anybody know where we can debug Lua errors for lua scripts called by the suricata rules' luajit:scriptname.lua option? The suricata --init-errors-fatal runtime option provides some basic validation, but we miss some of the errors that occur at script runtime, such as when requiring non-existent modules, e.g.:</div><div><div><b>local myvar = requires 'fakemodule'</b></div><div>should throw the following error =</div><div><b>lua: myluascript.lua:1: module 'fakemodule' not found:</b></div><div><b>no field package.preload['fakemodule']</b></div><div>....</div></div><div>However, when the script is referenced by a suricata rule, then suricata is launced with the <b>--init-errors-fatal</b> option, suricata is fully launched without errors. Furthermore, when the script is triggered by packets matching said rule, the script silently fails, without any output. The only way to know that it silently failed is that none of my <b>debug_file:write(...)</b> were activated.</div><div><br></div><div>If there is a default log file, or a configuration option in <b>suricata.yaml</b> to specify a log file to write lua errors and output to, I'd  be much obliged if someone could point it out.</div><div><br></div><div>Thanks all!</div><div>Nasir</div></div>