mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
28 lines
423 B
Text
28 lines
423 B
Text
#
|
|
# @TEST-EXEC: bro %INPUT
|
|
# @TEST-EXEC: btest-diff testing.log
|
|
|
|
redef enum Log::ID += { TESTING };
|
|
|
|
type Foo: record {
|
|
val1: count;
|
|
val2: count;
|
|
} &log;
|
|
|
|
type Bar: record {
|
|
a: Foo &log &optional;
|
|
b: count &log;
|
|
};
|
|
|
|
event bro_init()
|
|
{
|
|
Log::create_stream(TESTING, [$columns=Bar]);
|
|
|
|
local x: Bar;
|
|
|
|
x = [$b=6];
|
|
Log::write(TESTING, x);
|
|
|
|
x = [$a=[$val1=1,$val2=2], $b=3];
|
|
Log::write(TESTING, x);
|
|
}
|