sebbacon/alaveteli — Issue #269: check-recent-requests-sent script aborts if log is missing information
Author: dcabo
Created: 2011-10-12 12:51:12+00:00
State: open

The code now throws an exception and aborts if a log line is missing the 'from' value. This means that if one log file is wrong (i.e. missing required information; as is the case for AsktheEU in production right now) the checking stops there. So I'd suggest replacing:

if !exim_log.line.include?(envelope_from)
raise "unexpected parsing of exim line"
end

with

if !exim_log.line.include?(envelope_from)
$stderr.puts("unexpected parsing of exim line [#{exim_log.line}]"
end

Note that $stderr is already being used to warn about missing request deliveries, so we'd be making the output of the script more consistent.