projects
/
spider.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2d04aee
)
add a 36 month limit on sh/log queries.
author
minima
<minima>
Sun, 15 Jan 2006 20:18:48 +0000
(20:18 +0000)
committer
minima
<minima>
Sun, 15 Jan 2006 20:18:48 +0000
(20:18 +0000)
Changes
patch
|
blob
|
history
perl/DXLogPrint.pm
patch
|
blob
|
history
diff --git
a/Changes
b/Changes
index dc5fbbefe5ec3165f350b84f974d11b2d18be5f5..e9872d2e3b871259228fdead67828e3b99859d88 100644
(file)
--- a/
Changes
+++ b/
Changes
@@
-4,6
+4,7
@@
with initialising the User file.
2. Fixed the problem with certain things not being shown in sh/log (because of
a regex that rejected too many things).
3. Speeded up sh/log quite a bit at the same time.
2. Fixed the problem with certain things not being shown in sh/log (because of
a regex that rejected too many things).
3. Speeded up sh/log quite a bit at the same time.
+4. Add a default limit of the last 36 months for sh/log querys.
14Jan06=======================================================================
1. undo frequency rounding change, it causes more problems than it solves.
11Jan06=======================================================================
14Jan06=======================================================================
1. undo frequency rounding change, it causes more problems than it solves.
11Jan06=======================================================================
diff --git
a/perl/DXLogPrint.pm
b/perl/DXLogPrint.pm
index a968e53b1f818d18c9cb467faa1e6b6a98757e57..8ce8e35c535492b6ec1a1dbe9f6a3176de191d08 100644
(file)
--- a/
perl/DXLogPrint.pm
+++ b/
perl/DXLogPrint.pm
@@
-18,12
+18,14
@@
use RingBuf;
use strict;
use strict;
-use vars qw($VERSION $BRANCH);
+use vars qw($VERSION $BRANCH
$maxmonths
);
$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0));
$main::build += $VERSION;
$main::branch += $BRANCH;
$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0));
$main::build += $VERSION;
$main::branch += $BRANCH;
+$maxmonths = 36;
+
#
# print some items from the log backwards in time
#
#
# print some items from the log backwards in time
#
@@
-70,8
+72,9
@@
sub print
$fcb->close; # close any open files
$fcb->close; # close any open files
+ my $months;
my $fh = $fcb->open($jdate);
my $fh = $fcb->open($jdate);
- L1: for (
;@in < $to;
) {
+ L1: for (
$months = 0; $months < $maxmonths && @in < $tot; $months++
) {
my $ref;
my $ring = RingBuf->new($tot);
my $ref;
my $ring = RingBuf->new($tot);
@@
-87,6
+90,9
@@
sub print
$fh = $fcb->openprev(); # get the next file
last if !$fh;
}
$fh = $fcb->openprev(); # get the next file
last if !$fh;
}
+
+ @in = splice @in, -$tot, $tot if @in > $tot;
+
for (@in) {
my @line = split /\^/ ;
push @out, print_item(\@line);
for (@in) {
my @line = split /\^/ ;
push @out, print_item(\@line);