Always emit scripting errors to stderr during zeek_init

Otherwise, setting Reporter::errors_to_stderr=F causes important
error messages to be lost (and this setting is the default for
ZeekCtl).  E.g. now that we terminate if there's errors during
zeek_init, GH-369 shows that the only error message given was
"fatal error: errors occurred while initializing", which is not
helpful in determining the actual issue.
This commit is contained in:
Jon Siwek 2019-05-17 14:13:46 -07:00
parent 9d07e4f0b8
commit dd173f4961
6 changed files with 34 additions and 9 deletions

View file

@ -1087,6 +1087,7 @@ int main(int argc, char** argv)
reporter->FatalError("errors occurred while initializing");
broker_mgr->ZeekInitDone();
reporter->ZeekInitDone();
analyzer_mgr->DumpDebug();
have_pending_timers = ! reading_traces && timer_mgr->Size() > 0;