mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Improve supervisor debug logging
Mainly making stem process debug messages sent up to parent supervisor process and included in its debug.log though option to print to stderr remains in form of environment variable in case debugging breaking change to the IPC mechanism itself.
This commit is contained in:
parent
0ff99c3df8
commit
80b3aef486
3 changed files with 95 additions and 40 deletions
14
src/main.cc
14
src/main.cc
|
@ -1067,17 +1067,11 @@ int main(int argc, char** argv)
|
|||
if ( options.debug_log_streams )
|
||||
{
|
||||
debug_logger.EnableStreams(options.debug_log_streams->data());
|
||||
const char* debug_log_name = nullptr;
|
||||
|
||||
if ( ! getenv("ZEEK_DEBUG_LOG_STDERR") )
|
||||
{
|
||||
if ( is_supervisor(options) )
|
||||
debug_log_name = "debug-supervisor";
|
||||
else
|
||||
debug_log_name = "debug";
|
||||
}
|
||||
|
||||
debug_logger.OpenDebugLog(debug_log_name);
|
||||
if ( getenv("ZEEK_DEBUG_LOG_STDERR") )
|
||||
debug_logger.OpenDebugLog(nullptr);
|
||||
else
|
||||
debug_logger.OpenDebugLog("debug");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue