ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent-MP/MP/LogCatcher.pm
(Generate patch)

Comparing AnyEvent-MP/MP/LogCatcher.pm (file contents):
Revision 1.2 by root, Sun Sep 6 00:13:51 2009 UTC vs.
Revision 1.3 by root, Mon Sep 7 18:33:44 2009 UTC

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
86Starts catching all log messages from all nodes with level C<$level> or
87lower. If the C<$level> is C<undef>, then stop catching all messages
88again.
89
90Example: start a node that catches all messages (you might have to specify
91a suitable profile name).
92
93 aemp run profilename services '[["AnyEvent::MP::LogCatcher::catch",9]]'
94
95=cut
96
84sub catch { 97sub 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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines