projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
2. Add full individual checking for all PC protocol fields in all messages
[spider.git]
/
perl
/
watchdbg
diff --git
a/perl/watchdbg
b/perl/watchdbg
index 745d6983ebff1598ddf626d4ebdfb5e8249e82d1..6da3a586a712040d19cff2590ab3c5e85b372009 100755
(executable)
--- a/
perl/watchdbg
+++ b/
perl/watchdbg
@@
-41,8
+41,8
@@
for (;;) {
if ($exp) {
printit($line) if $line =~ m{(?:$exp)}oi;
} else {
if ($exp) {
printit($line) if $line =~ m{(?:$exp)}oi;
} else {
- printit($line);
- }
+
printit($line);
+
}
} else {
sleep(1);
} else {
sleep(1);
@@
-52,6
+52,7
@@
for (;;) {
if ($today[1] != $now[1]) {
$fp->close;
$fh = $fp->open(@now) or die $!;
if ($today[1] != $now[1]) {
$fp->close;
$fh = $fp->open(@now) or die $!;
+ @today = @now;
}
}
}
}
}
}
@@
-61,6
+62,9
@@
sub printit
my $line = shift;
my @line = split '\^', $line;
my $t = shift @line;
my $line = shift;
my @line = split '\^', $line;
my $t = shift @line;
- print atime($t), ' ', join('^', @line);
+ my ($sec,$min,$hour) = gmtime((defined $t) ? $t : time);
+ my $buf = sprintf "%02d:%02d:%02d", $hour, $min, $sec;
+
+ print $buf, ' ', join('^', @line);
}
exit(0);
}
exit(0);