Kittyfisto / Tailviewer

Open source log file viewer
https://kittyfisto.github.io/Tailviewer/
MIT License
186 stars 38 forks source link

Allow to include/exclude entries in grouped data sources #254

Closed BenKenobi85 closed 3 years ago

BenKenobi85 commented 3 years ago

When analyzing stuff where multiple log files contribute to a single problem it's very helpful to be able to have these files grouped together to a form a bigger data source, e.g. the data source group.

This request aims to extend the "data source group" feature by allowing to "disable" specific files being part of the group.

Disabling in this context means to have a small button allowing to exclude the disabled file from any processing within the data source group. A second click allows to "enable" the file again. It should be similar to how a quick filter works, disabling the filter means the filter is not applied any more, but the filter specification is still kept in the list of available filters. Disabled files should be grayed out for easier visual perception.

Imagine a situation where some small and some big logs are part of data source group. The big files take long to process and might not be taken into account for every analysis. Being able to temporarily "disable" these big files in the data source group makes the processing of the group a lot faster and helps to keep the overview.

You could have the same effect by simply removing the big files from the data source group but this means once you need them again you have find them and add them again. Being able to "disable" them keeps the benefit that data source groups also help to organize logically connected files.

Kittyfisto commented 3 years ago

That sounds like a helpful feature (I can remember several instances where I've made this conscious ungrouping / grouping before because TV simply doesn't have that yet.

A few things:

  1. I'll probably make this part of a context menu first:
    • Having buttons on a drag'n drop element is problematic already and I don't want to add more problematic surface area
    • I think and hope we can spare two clicks (instead of one) to achieve this
  2. Even though it would be simpler (e.g. less code) to completely filter the data source from both the merged view as well as the single data source view, I think that is the less desirable option. E.g. it probably makes sense to only remove the log events from the merged data source, but clicking on the individual data source, even when "disabled" will still show that log file as usual.
  3. At the moment I'm thinking of calling this "exclude" and "include", e.g. the entries would look as follows: image
BenKenobi85 commented 3 years ago

I like the "exclude / include" naming. First beta of this features seems to work well.

What about also adding an "Exclude all" / "Include all" to the context menu of the "Merged Data Source" item?

Kittyfisto commented 3 years ago

I've added context menu entries for Merged- and Folder Data Sources which can be used include / exclude all children at once.

Kittyfisto commented 3 years ago

Available with Tailviewer v0.9.3.897.