mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00

* origin/topic/seth/zeek_init: Some more testing fixes. Update docs and tests for bro_(init|done) -> zeek_(init|done) Implement the zeek_init handler.
23 lines
345 B
Text
23 lines
345 B
Text
#
|
|
# @TEST-EXEC: bro -b %INPUT
|
|
# @TEST-EXEC: btest-diff ssh.log
|
|
|
|
module SSH;
|
|
|
|
export {
|
|
redef enum Log::ID += { LOG };
|
|
|
|
type Log: record {
|
|
t: time;
|
|
f: file;
|
|
} &log;
|
|
}
|
|
|
|
const foo_log = open_log_file("Foo") &redef;
|
|
|
|
event zeek_init()
|
|
{
|
|
Log::create_stream(SSH::LOG, [$columns=Log]);
|
|
Log::write(SSH::LOG, [$t=network_time(), $f=foo_log]);
|
|
}
|
|
|