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.1 by root, Sun Sep 6 00:13:21 2009 UTC vs.
Revision 1.3 by root, Mon Sep 7 18:33:44 2009 UTC

77 77
78 # establish connection 78 # establish connection
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 mon $lport, sub {
83 warn "$lport $rport <@_>\n";#d#
84 };
85} 82}
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
86 96
87sub catch { 97sub catch {
88 $LOGLEVEL = $_[0]; 98 $LOGLEVEL = $_[0];
89 kil $_, "restart" for values %lport; 99 kil $_, "restart" for values %lport;
90 %lport = (); 100 %lport = ();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines