X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Fdebug_ring.pl;h=a8a2900eb224f0729a188b26ac047114e6f41f33;hb=5d10d2095199b0d798926fa9e79a3f580c296b67;hp=9a2eb01a3334f3e5b13803674431f6f11c0981f3;hpb=83445c4f6ec6c885260944a9abe648aced399c40;p=spider.git diff --git a/cmd/show/debug_ring.pl b/cmd/show/debug_ring.pl index 9a2eb01a..a8a2900e 100644 --- a/cmd/show/debug_ring.pl +++ b/cmd/show/debug_ring.pl @@ -7,7 +7,16 @@ my $self = shift; my $line = shift;; return (1, $self->msg('e5')) unless $self->priv >= 9; -DXDebug::dbgprintring(); -DXDebug::dbgclearring() if $line =~ /^clear$/; +my @args = split /\s+/, $line; +my $n; +my $doclear; -return (1, 'Contents of debug ring buffer logged. View with watchdbg.'); +for (@args) { + say "arg: $_"; + $n = 0+$_ if /^\d+$/; + $doclear++ if /^clear$/; +} +my $lines = DXDebug::dbgprintring($n); +DXDebug::dbgclearring() if $doclear; + +return (1, qq{Contents of $lines lines of debug ring buffer logged. View with watchdbg.});