… | |
… | |
79 | my $rport = spawn $node, "AnyEvent::MP::LogCatcher::connect", 0, $lport, $LOGLEVEL; |
79 | my $rport = spawn $node, "AnyEvent::MP::LogCatcher::connect", 0, $lport, $LOGLEVEL; |
80 | |
80 | |
81 | mon $rport, $lport; |
81 | mon $rport, $lport; |
82 | } |
82 | } |
83 | |
83 | |
|
|
84 | =item AnyEvent::MP::LogCatcher::catch [$level] |
|
|
85 | |
|
|
86 | Starts catching all log messages from all nodes with level C<$level> or |
|
|
87 | lower. If the C<$level> is C<undef>, then stop catching all messages |
|
|
88 | again. |
|
|
89 | |
|
|
90 | Example: start a node that catches all messages (you might have to specify |
|
|
91 | a suitable profile name). |
|
|
92 | |
|
|
93 | aemp run profilename services '[["AnyEvent::MP::LogCatcher::catch",9]]' |
|
|
94 | |
|
|
95 | =cut |
|
|
96 | |
84 | sub catch { |
97 | sub catch { |
85 | $LOGLEVEL = $_[0]; |
98 | $LOGLEVEL = $_[0]; |
86 | kil $_, "restart" for values %lport; |
99 | kil $_, "restart" for values %lport; |
87 | %lport = (); |
100 | %lport = (); |
88 | |
101 | |