projects
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tidying
[exim.git]
/
src
/
src
/
exigrep.src
diff --git
a/src/src/exigrep.src
b/src/src/exigrep.src
index 45bdc2c80cffe3bafc2f2cfa08773fc37b4e4b8a..1899267be74d048bef2d313f7b8fe9e876582787 100644
(file)
--- a/
src/src/exigrep.src
+++ b/
src/src/exigrep.src
@@
-45,7
+45,7
@@
use POSIX qw(mktime);
sub seconds {
my($year,$month,$day,$hour,$min,$sec,$tzs,$tzh,$tzm) =
sub seconds {
my($year,$month,$day,$hour,$min,$sec,$tzs,$tzh,$tzm) =
- $_[0] =~ /^(\d{4})-(\d\d)-(\d\d)\s(\d\d):(\d\d):(\d\d)(?>\s([+-])(\d\d)(\d\d))?/o;
+ $_[0] =~ /^(\d{4})-(\d\d)-(\d\d)\s(\d\d):(\d\d):(\d\d)(?
:.\d+)?(?
>\s([+-])(\d\d)(\d\d))?/o;
my $seconds = mktime $sec, $min, $hour, $day, $month - 1, $year - 1900;
my $seconds = mktime $sec, $min, $hour, $day, $month - 1, $year - 1900;
@@
-83,7
+83,7
@@
sub do_line {
if (!/^\d{4}-/o) { $_ =~ s/^.*? exim\b.*?: //o; }
return unless
if (!/^\d{4}-/o) { $_ =~ s/^.*? exim\b.*?: //o; }
return unless
- my($date,$id) = /^(\d{4}-\d\d-\d\d \d\d:\d\d:\d\d (?:[+-]\d{4} )?)(?:\[\d+\] )?(\w{6}\-\w{6}\-\w{2})?/o;
+ my($date,$id) = /^(\d{4}-\d\d-\d\d \d\d:\d\d:\d\d
(?:\.\d+)?
(?:[+-]\d{4} )?)(?:\[\d+\] )?(\w{6}\-\w{6}\-\w{2})?/o;
# Handle the case when the log line belongs to a specific message. We save
# lines for specific messages until the message is complete. Then either print
# Handle the case when the log line belongs to a specific message. We save
# lines for specific messages until the message is complete. Then either print
@@
-124,7
+124,7
@@
if (defined $id)
if (index($_, 'Completed') != -1 ||
index($_, 'SMTP data timeout') != -1 ||
(index($_, 'rejected') != -1 &&
if (index($_, 'Completed') != -1 ||
index($_, 'SMTP data timeout') != -1 ||
(index($_, 'rejected') != -1 &&
- /^(\d{4}-\d\d-\d\d \d\d:\d\d:\d\d (?:[+-]\d{4} )?)(?:\[\d+\] )?\w{6}\-\w{6}\-\w{2} rejected/o))
+ /^(\d{4}-\d\d-\d\d \d\d:\d\d:\d\d
(?:\.\d+)?
(?:[+-]\d{4} )?)(?:\[\d+\] )?\w{6}\-\w{6}\-\w{2} rejected/o))
{
if ($queue_time != -1 &&
$saved{$id} =~ /^(\d{4}-\d\d-\d\d \d\d:\d\d:\d\d ([+-]\d{4} )?)/o)
{
if ($queue_time != -1 &&
$saved{$id} =~ /^(\d{4}-\d\d-\d\d \d\d:\d\d:\d\d ([+-]\d{4} )?)/o)
@@
-239,11
+239,12
@@
if (-t 1 and $use_pager)
{
foreach ($ENV{PAGER}//(), 'less', 'more')
{
{
foreach ($ENV{PAGER}//(), 'less', 'more')
{
+ local $ENV{LESS} .= ' --no-init --quit-if-one-screen';
open(my $pager, '|-', $_) or next;
select $pager;
last;
}
open(my $pager, '|-', $_) or next;
select $pager;
last;
}
-}
+
}
# If file arguments are given, open each one and process according as it is
# is compressed or not.
# If file arguments are given, open each one and process according as it is
# is compressed or not.