X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fwatchdbg;fp=perl%2Fwatchdbg;h=7975529655809ac79b1e75447fb827f193f9c86f;hb=b08d8e083dd9762d205f68ada2bf56bd0a8acd90;hp=6058ed64566481494a6321a8dab1065734071dc6;hpb=f443f102c592af25cd3468b637324ff78cc58300;p=spider.git diff --git a/perl/watchdbg b/perl/watchdbg index 6058ed64..79755296 100755 --- a/perl/watchdbg +++ b/perl/watchdbg @@ -73,12 +73,14 @@ sub printit { while (@_) { my $line = shift; + chomp $line; + $line =~ s/([\x00-\x1f\x7f-\xff])/sprintf("\\x%02X", ord($1))/eg; my @line = split '\^', $line; my $t = shift @line; my ($sec,$min,$hour) = gmtime((defined $t) ? $t : time); my $buf = sprintf "%02d:%02d:%02d", $hour, $min, $sec; - print $buf, ' ', join('^', @line); + print $buf, ' ', join('^', @line), "\n"; } } exit(0);