mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Don't create debug.log immediately upon startup
Instead of creating the debug.log immediately when bro starts, now it is created only after the debug streams are enabled. This avoids having an empty log being created when it shouldn't be, in usages such as "bro -h", "bro -v", or "bro -B help" (and also when using broctl, which needs to run "bro -v").
This commit is contained in:
parent
8c54f91617
commit
0cae2ca003
3 changed files with 18 additions and 11 deletions
|
@ -53,9 +53,11 @@ namespace plugin { class Plugin; }
|
|||
class DebugLogger {
|
||||
public:
|
||||
// Output goes to stderr per default.
|
||||
DebugLogger(const char* filename = 0);
|
||||
DebugLogger();
|
||||
~DebugLogger();
|
||||
|
||||
void OpenDebugLog(const char* filename = 0);
|
||||
|
||||
void Log(DebugStream stream, const char* fmt, ...);
|
||||
void Log(const plugin::Plugin& plugin, const char* fmt, ...);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue