[Bro-Dev] [Bro-Commits] [git/bro] topic/robin/reporting: Overhauling the internal reporting of messages to the user. (93894ee)

Gregor Maier gregor at icir.org
Mon Jun 27 07:26:01 PDT 2011

I really like the idea of having event handlers to handle error 
messages! A couple more comments:

Can the log_* handlers also write to stderr instead of stdout? I think 
that would be better.

It appears that there are several places, esp. in Expr.cc and Stmt.cc 
that still use the old Error(), Internal(), etc. functions (including 
the SetError). Is this on purpose?

On 6/26/11 21:00 , Robin Sommer wrote:
> On Sun, Jun 26, 2011 at 20:48 -0700, you wrote:
>> How are errors in the script layer handled? If there's an error in a
>> script you can't really call an event handler for to handle that
>> error,
> It's not really *handled*, it just raises a new log_error event that
> reports the error with a message. That event is then just queued
> normally, which shouldn't cause any further trouble.

I was more wondering what would happen if due to an error the handler 
for log_error cannot run properly. I.e., whether there can be a case 
were we don't see any error messages.

> (Well, I guess the handler for log_error better doesn't cause any new
> errors; but even if, it will just flood the log file, Bro will keep
> processing.)

Well, log_error will go in an endless loop and continue to queue events. 
So bro won't process any more packets because the event queue never gets 
empty, right?

Gregor Maier
<gregor at icir.org>  <gregor at icsi.berkeley.edu>
Int. Computer Science Institute (ICSI)
1947 Center St., Ste. 600
Berkeley, CA 94704, USA

More information about the bro-dev mailing list