Added support for FollowUp line matches

This commit is contained in:
2015-10-06 12:01:09 +02:00
parent 9a59bafc16
commit 685e9eafc1
2 changed files with 61 additions and 14 deletions

View File

@@ -173,6 +173,10 @@ begin
begin
FLogFileName := AParams;
end;
'followup':
begin
FCurrentLineFilter.SetFollowUp(AParams);
end;
end;
end;
@@ -253,10 +257,19 @@ var
lineFilter: TLineFilter;
groupRanges: TGroupRanges;
begin
if (FCurrentLineFilter <> nil)
and (FCurrentLineFilter.FollowUpMatch(ALine, groupRanges)) then
begin
WriteContent(ALine, FCurrentLineFilter.Filters, groupRanges);
Exit;
end else
FCurrentLineFilter := nil; //We assume, nothing matched.
for lineFilter in FLineFilters do
begin
if lineFilter.Matches(ALine, groupRanges) then
begin
FCurrentLineFilter := lineFilter; //Remember the last matching filter
WriteContent(ALine, lineFilter.Filters, groupRanges);
Break;
end;