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:
Jon Siwek 2019-12-02 13:37:19 -08:00
commit 30d0b21ecc
20 changed files with 205 additions and 5 deletions

View file

@ -66,6 +66,9 @@ public:
bool IsRawOutput() const { return raw_output; }
protected:
friend class PrintStmt;
BroFile() { Init(); }
void Init();
@ -80,7 +83,8 @@ protected:
// Returns nil if the file is not active, was in error, etc.
// (Protected because we do not want anyone to write directly
// to the file.)
// to the file, but the PrintStmt friend uses this to check whether
// it's really stdout.)
FILE* File();
// Raises a file_opened event.