mirror of
https://github.com/zeek/zeek.git
synced 2025-10-11 02:58:20 +00:00
Merge remote-tracking branch 'origin/topic/neverlord/broker-logging'
* origin/topic/neverlord/broker-logging: Integrate review feedback Hook into Broker logs via its new API
This commit is contained in:
commit
14697ea6ba
11 changed files with 297 additions and 21 deletions
|
@ -16,6 +16,8 @@
|
|||
|
||||
@load base/frameworks/broker/store
|
||||
|
||||
redef Broker::log_stderr_severity_level = Broker::LOG_ERROR;
|
||||
|
||||
global test_store: opaque of Broker::Store;
|
||||
global test_table: table[string] of count &broker_store="test_store_42";
|
||||
|
||||
|
|
|
@ -5,13 +5,15 @@
|
|||
|
||||
# Evil
|
||||
# @TEST-EXEC: dd if=/dev/zero of=path_to_db.sqlite seek=512 count=32 bs=1
|
||||
# @TEST-EXEC-FAIL: zeek -b %INPUT >> out
|
||||
# @TEST-EXEC: zeek -b %INPUT >> out
|
||||
#
|
||||
# @TEST-EXEC: grep 'database disk image is malformed' .stderr
|
||||
# @TEST-EXEC: btest-diff out
|
||||
|
||||
@load base/frameworks/broker/store
|
||||
|
||||
redef Broker::log_stderr_severity_level = Broker::LOG_ERROR;
|
||||
|
||||
global test_store: opaque of Broker::Store;
|
||||
global test_table: table[string] of count &broker_store="test_store_42";
|
||||
|
||||
|
@ -28,10 +30,10 @@ event zeek_init()
|
|||
);
|
||||
if ( Broker::is_closed(test_store) ) {
|
||||
print("failed to open store");
|
||||
exit(1);
|
||||
} else {
|
||||
print("store is open");
|
||||
terminate();
|
||||
return;
|
||||
}
|
||||
print("store is open");
|
||||
|
||||
local rows = 100;
|
||||
local i = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue