mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 22:58:20 +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
|
@ -755,6 +755,8 @@ int main(int argc, char** argv)
|
|||
#ifdef DEBUG
|
||||
if ( debug_streams )
|
||||
debug_logger.EnableStreams(debug_streams);
|
||||
|
||||
debug_logger.OpenDebugLog("debug");
|
||||
#endif
|
||||
|
||||
init_random_seed(seed, (seed_load_file && *seed_load_file ? seed_load_file : 0) , seed_save_file);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue