7,166
edits
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
*high precision timestamps 再 | *high precision timestamps 再 | ||
/opt/zimbra/common/bin/prepflog.pl | /opt/zimbra/common/bin/prepflog.pl | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="patch" enclose="div"> | ||
250c250 | |||
< /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:[\+\-](?:\d{2}):(?:\d{2})|Z) \S+ (.+)$/o) == 10); | < /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:[\+\-](?:\d{2}):(?:\d{2})|Z) \S+ (.+)$/o) == 10); | ||
--- | --- | ||
> /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.\d+)?(?:[\+\-](?:\d{2}):(?:\d{2})|Z) \S+ (.+)$/) == 7); | > /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.\d+)?(?:[\+\-](?:\d{2}):(?:\d{2})|Z) \S+ (.+)$/) == 7); | ||
255,256c255,257 | |||
< unless((($cmd, $qid) = $logRmdr =~ m#^(?:postfix|$syslogName)/([^\[:]*).*?: ([^:\s]+)#o) == 2 || | |||
< (($cmd, $qid) = $logRmdr =~ m#^((?:postfix)(?:-script)?)(?:\[\d+\])?: ([^:\s]+)#o) == 2) | |||
--- | |||
> unless((($cmd, $qid) = $logRmdr =~ m#^(?:postfix-?\w*|$syslogName)(?:/(?:smtps|submission))?/([^\[:]*).*?: ([^:\s]+)#o) == 2 || | |||
> (($cmd, $qid) = $logRmdr =~ m#^((?:postfix)(?:-script)?)(?:\[\d+\])?: ([^:\s]+)#o) == 2 || | |||
> (($cmd, $qid) = $logRmdr =~ m#^MailScanner\[\d+\]: (Requeue): (\w+)\.#) == 2) | |||
560c561 | |||
< # return a date string to match in log | |||
--- | |||
> # return traditional and RFC3339 date strings to match in log | |||
562c563 | |||
< my $dateOpt = $_[0]; | |||
--- | |||
> my ($dateOpt) = $_[0]; | |||
572c573 | |||
< my ($t_mday, $t_mon) = (localtime($time))[3,4]; | |||
--- | |||
> my ($t_mday, $t_mon, $t_year) = (localtime($time))[3,4,5]; | |||
574c575 | |||
< return sprintf("%s %2d", $monthNames[$t_mon], $t_mday); | |||
--- | |||
> return sprintf("%s %2d", $monthNames[$t_mon], $t_mday), sprintf("%04d-%02d-%02d", $t_year+1900, $t_mon+1, $t_mday); | |||
</syntaxhighlight> | </syntaxhighlight> | ||