[Bro] bro_log_file and log_hook

Robin Sommer robin at icir.org
Fri Apr 28 09:11:06 PDT 2006

On Fri, Apr 28, 2006 at 09:57 -0400, Chris Alexander wrote:

> In trying to turn off stderr spraying to the screen I found something that 
> doesn't seem to provide enough info - or maybe I'm having a senior moment?

No, you don't. With Bro 0.9a7, there has been a change of names with
regards to "log", "alert", "alarm", etc. to make their uses more
consistent/intuitive (see the CHANGES entry for more information).
The docs haven't been updated yet. 

The former "log_hook" is now called "alarm_hook". Here's an example:

   function alarm_hook(msg: string): bool
        print "Foo", msg;
        return T;

   alarm "Bar";        

   > ./bro ./a.bro 
   Foo, Bar
   1146240414.805556 Bar


Robin Sommer * Phone +1 (510) 666-2886 * robin at icir.org 
ICIR/ICSI    * Fax   +1 (510) 666-2956 *   www.icir.org

More information about the Bro mailing list