This PR implements exclusionary text filters. The text filters that ULogViewer lets users create today are what I call 'inclusionary' - meaning if any one of the selected filter-pattens match then the log entry is displayed
An exclusionary text filter is the opposite - if any of the exclusionary filter-patterns match then the log is not displayed.
Useful for things like "Show me all logs except if it has 'foo' or 'bar'"
Right now the way to create an exclusionary text filter is to prefix the name with ‘!’ character. I recognize this is crude but it helped me get it working quickly.
I can see a future change being to add a control in the text filter creation editor to mark something as “exclusionary” or not, rather than keying off the name.
Example:
If my log file is this
I can select !Foo predefined pattern and it will exclude anything with Foo
If I select both !Foo and !Cat it will exlude both but show everything else:
Note there is nothing special about !Foo and !Cat - they have the patterns Foo and Cat respectively. I've just named them with '!' at the start and the program treats them as exclusionary patterns
I think we need an option in Create/Edit text filter dialog to set whether the filter is used for inclusion or exclusion. But we can merge your change first and do further modification based on your code.
This PR implements exclusionary text filters. The text filters that ULogViewer lets users create today are what I call 'inclusionary' - meaning if any one of the selected filter-pattens match then the log entry is displayed An exclusionary text filter is the opposite - if any of the exclusionary filter-patterns match then the log is not displayed. Useful for things like "Show me all logs except if it has 'foo' or 'bar'"
Right now the way to create an exclusionary text filter is to prefix the name with ‘!’ character. I recognize this is crude but it helped me get it working quickly. I can see a future change being to add a control in the text filter creation editor to mark something as “exclusionary” or not, rather than keying off the name.
Example: If my log file is this
I can select !Foo predefined pattern and it will exclude anything with Foo
If I select both !Foo and !Cat it will exlude both but show everything else:
Note there is nothing special about !Foo and !Cat - they have the patterns Foo and Cat respectively. I've just named them with '!' at the start and the program treats them as exclusionary patterns