[Bro] bro script question.

Bryant, Thomas Thomas.Bryant at parsons.com
Wed Jun 4 08:21:00 PDT 2014


Justin,

   I added your line to the connection_established event:

event connection_established(c: connection) {
  local str = fmt("Connection established: %s", c$id);
  print fmt("%s\n", str); #TEST
  Log::write(TstRec::LOG, [$data=str]);
  # Log::write(TstLog::LOG, [$data=mkString()]);
}

  and got a different error:

error in ./tstLog.bro, line 14: unknown identifier TstRec::LOG, at or near "TstRec::LOG"

Bro can be very subtle... (subtle = "I don't know how it works!")

Tom
________________________________________
From: Justin Azoff [JAzoff at albany.edu]
Sent: Wednesday, June 04, 2014 10:08 AM
To: Bryant, Thomas
Cc: bro at bro.org
Subject: Re: [Bro] bro script question.

On Wed, Jun 04, 2014 at 01:49:57PM +0000, Bryant, Thomas wrote:
>   # Log::write(TstRec::LOG, $data=str);
>   # Log::write(TstLog::LOG, [$data=mkString()]);

You want

  Log::write(LOG, [$data=str]);

--
-- Justin Azoff




More information about the Bro mailing list