mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Add Supervisor::{stdout,stderr}_hook
These allow capturing/handling the stdout/stderr of child processes via Zeek scripts.
This commit is contained in:
parent
a06ef66edc
commit
10709c627b
8 changed files with 164 additions and 9 deletions
|
@ -117,4 +117,28 @@ export {
|
|||
## It's an error to call this function from a process other than
|
||||
## a supervised one.
|
||||
global node: function(): NodeConfig;
|
||||
|
||||
## Hooks intercepted stdout stream for all supervisor's child processes.
|
||||
##
|
||||
## node: the name of a previously created node via
|
||||
## :zeek:see:`Supervisor::create` indicating to which
|
||||
## child process the stdout line is associated.
|
||||
## An empty value is used to indicate the message
|
||||
## came from the internal supervisor stem process
|
||||
## (this should typically never happen).
|
||||
##
|
||||
## msg: line-buffered contents from the stdout of a child process.
|
||||
global stdout_hook: hook(node: string, msg: string);
|
||||
|
||||
## Hooks intercepted stderr stream for all supervisor's child processes.
|
||||
##
|
||||
## node: the name of a previously created node via
|
||||
## :zeek:see:`Supervisor::create` indicating to which
|
||||
## child process the stdout line is associated.
|
||||
## A empty value is used to indicate the message
|
||||
## came from the internal supervisor stem process.
|
||||
## (this should typically never happen).
|
||||
##
|
||||
## msg: line-buffered contents from the stderr of a child process.
|
||||
global stderr_hook: hook(node: string, msg: string);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue