Files can now be logged; their filename will be written out.

This commit is contained in:
Robin Sommer 2011-04-17 20:52:18 -07:00
parent c132506203
commit 29b0d0d1d9
5 changed files with 45 additions and 2 deletions

View file

@ -0,0 +1,2 @@
# t f
1303098703.62603 Foo.log

View file

@ -0,0 +1,23 @@
#
# @TEST-EXEC: bro %INPUT
# @TEST-EXEC: btest-diff ssh.log
module SSH;
export {
redef enum Log::ID += { SSH };
type Log: record {
t: time;
f: file;
} &log;
}
const foo_log = open_log_file("Foo") &redef;
event bro_init()
{
Log::create_stream(SSH, [$columns=Log]);
Log::write(SSH, [$t=network_time(), $f=foo_log]);
}