From: Philip Hazel Date: Mon, 1 Aug 2005 13:28:30 +0000 (+0000) Subject: Exigrep patch to allow it to handle syslog files. X-Git-Tag: exim-4_53~80 X-Git-Url: https://git.exim.org/users/heiko/exim.git/commitdiff_plain/395ff96dec2b7ef473ffb5dd39b79b62d1661eee?ds=sidebyside Exigrep patch to allow it to handle syslog files. --- diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index 2846c96b6..e61046715 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -1,4 +1,4 @@ -$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.183 2005/08/01 13:20:28 ph10 Exp $ +$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.184 2005/08/01 13:28:30 ph10 Exp $ Change log file for Exim from version 4.21 ------------------------------------------- @@ -11,6 +11,8 @@ TK/01 Added the "success_on_redirect" address verification option. See PH/01 Added support for SQLite, basic code supplied by David Woodhouse. +PH/02 Patch to exigrep to allow it to work on syslog lines. + Exim version 4.52 ----------------- diff --git a/src/src/exigrep.src b/src/src/exigrep.src index e824bb41c..c6ccbfdc5 100644 --- a/src/src/exigrep.src +++ b/src/src/exigrep.src @@ -1,5 +1,5 @@ #! PERL_COMMAND -w -# $Cambridge: exim/src/src/exigrep.src,v 1.2 2004/12/21 11:28:38 ph10 Exp $ +# $Cambridge: exim/src/src/exigrep.src,v 1.3 2005/08/01 13:28:30 ph10 Exp $ use strict; @@ -58,6 +58,11 @@ return $seconds; my (%saved, %id_list, $pattern, $queue_time); sub do_line { + +# Convert syslog lines to mainlog format, as in eximstats. + +if (! /^\\d{4}/) { $_ =~ s/^.*? exim\b.*?: //; } + return unless my($date,$entry) = /^(\d{4}-\d\d-\d\d \d\d:\d\d:\d\d (?:[+-]\d{4} )?)(.*)/;