mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 02:28:21 +00:00
Merge remote-tracking branch 'origin/topic/seth/reporter-to-stderr'
* origin/topic/seth/reporter-to-stderr: A couple of tests for printing reporter messages to STDERR. Small improvements for printing reporter messages to STDERR. Reporter warnings and error now print to stderr by default. Closes #836.
This commit is contained in:
commit
9cea1d3b27
9 changed files with 88 additions and 11 deletions
|
@ -0,0 +1,8 @@
|
|||
#separator \x09
|
||||
#set_separator ,
|
||||
#empty_field (empty)
|
||||
#unset_field -
|
||||
#path reporter
|
||||
#fields ts level message location
|
||||
#types time enum string string
|
||||
0.000000 Reporter::ERROR no such index (test[3]) /blah/testing/btest/.tmp/scripts.base.frameworks.reporter.disable-stderr/disable-stderr.bro, line 12
|
|
@ -0,0 +1 @@
|
|||
ERROR: no such index (test[3]) (/blah/testing/btest/.tmp/scripts.base.frameworks.reporter.stderr/stderr.bro, line 9)
|
|
@ -0,0 +1,8 @@
|
|||
#separator \x09
|
||||
#set_separator ,
|
||||
#empty_field (empty)
|
||||
#unset_field -
|
||||
#path reporter
|
||||
#fields ts level message location
|
||||
#types time enum string string
|
||||
0.000000 Reporter::ERROR no such index (test[3]) /blah/testing/btest/.tmp/scripts.base.frameworks.reporter.stderr/stderr.bro, line 9
|
|
@ -0,0 +1,13 @@
|
|||
# @TEST-EXEC: bro %INPUT
|
||||
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff .stderr
|
||||
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff reporter.log
|
||||
|
||||
redef Reporter::warnings_to_stderr = F;
|
||||
redef Reporter::errors_to_stderr = F;
|
||||
|
||||
global test: table[count] of string = {};
|
||||
|
||||
event bro_init()
|
||||
{
|
||||
print test[3];
|
||||
}
|
10
testing/btest/scripts/base/frameworks/reporter/stderr.bro
Normal file
10
testing/btest/scripts/base/frameworks/reporter/stderr.bro
Normal file
|
@ -0,0 +1,10 @@
|
|||
# @TEST-EXEC: bro %INPUT
|
||||
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff .stderr
|
||||
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff reporter.log
|
||||
|
||||
global test: table[count] of string = {};
|
||||
|
||||
event bro_init()
|
||||
{
|
||||
print test[3];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue