mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Files can now be logged; their filename will be written out.
This commit is contained in:
parent
c132506203
commit
29b0d0d1d9
5 changed files with 45 additions and 2 deletions
2
testing/btest/Baseline/logging.file/ssh.log
Normal file
2
testing/btest/Baseline/logging.file/ssh.log
Normal file
|
@ -0,0 +1,2 @@
|
|||
# t f
|
||||
1303098703.62603 Foo.log
|
23
testing/btest/logging/file.bro
Normal file
23
testing/btest/logging/file.bro
Normal 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]);
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue