272da35c2bb7d69ca86a07f391c5d7e33ac146d8
[spider.git] / cmd / show / debug_ring.pl
1 #
2 # Log the current values of the DXDebug dbgring butter
3 #
4 #
5 #
6 my $self = shift;
7 my $line = shift;;
8 return (1, $self->msg('e5')) unless $self->priv >= 9;
9
10 my @args = split /\s+/, $line;
11 my $n;
12 my $doclear;
13
14 for (@args) {
15         $n = 0+$_ if /^\d+$/;
16         $doclear++ if /^clear$/;
17 }
18 DXDebug::dbgprintring($n);
19 DXDebug::dbgclearring() if $doclear;
20
21 return (1, 'Contents of debug ring buffer logged. View with watchdbg.');