mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 07:38:19 +00:00
Merge remote-tracking branch 'origin/topic/dev/print-to-log'
Adjustments during merge: - kept the UNKNOWN Log::ID as placeholder value - changed the coverage.find-bro-logs test to check for arbitrary $path field values instead of just string literals - don't force EnumVal to unsigned integer since the relevant union member is the signed integer and added the relevant enum values/types to .bif files for easier access - compare FILE* versus file name to check for stdout equality (don't think it matters much, just a bit more efficient) - minor whitespace/style tweaks * origin/topic/dev/print-to-log: Added a non boolean configuration and other changes as suggested by Jon Allow Print Statements to be redirected to a Log# This is a combination of 3 commits.
This commit is contained in:
commit
30d0b21ecc
20 changed files with 205 additions and 5 deletions
|
@ -0,0 +1,25 @@
|
|||
#
|
||||
# @TEST-EXEC: zeek -b %INPUT
|
||||
# @TEST-EXEC: btest-diff print.log
|
||||
# @TEST-EXEC: btest-diff .stdout
|
||||
# @TEST-EXEC: btest-diff otherfile
|
||||
# @TEST-EXEC: btest-diff anotherfile
|
||||
|
||||
redef Log::print_to_log = Log::REDIRECT_STDOUT;
|
||||
|
||||
event zeek_init()
|
||||
{
|
||||
local f = open("otherfile");
|
||||
print f, "hello world ,";
|
||||
print "hello world ,";
|
||||
print f,2,T;
|
||||
print 2,T;
|
||||
close(f);
|
||||
}
|
||||
|
||||
event Log::log_print (rec: Log::PrintLogInfo)
|
||||
{
|
||||
local f = open("anotherfile");
|
||||
print f,"from event",rec;
|
||||
close(f);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue