--- AnyEvent-MP/MP/LogCatcher.pm 2009/09/06 00:13:21 1.1 +++ AnyEvent-MP/MP/LogCatcher.pm 2009/09/07 18:33:44 1.3 @@ -79,11 +79,21 @@ my $rport = spawn $node, "AnyEvent::MP::LogCatcher::connect", 0, $lport, $LOGLEVEL; mon $rport, $lport; - mon $lport, sub { - warn "$lport $rport <@_>\n";#d# - }; } +=item AnyEvent::MP::LogCatcher::catch [$level] + +Starts catching all log messages from all nodes with level C<$level> or +lower. If the C<$level> is C, then stop catching all messages +again. + +Example: start a node that catches all messages (you might have to specify +a suitable profile name). + + aemp run profilename services '[["AnyEvent::MP::LogCatcher::catch",9]]' + +=cut + sub catch { $LOGLEVEL = $_[0]; kil $_, "restart" for values %lport;