Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the ability to add multiple :filter-expr #1252

Open
maxim-lbmv opened this issue Apr 5, 2024 · 2 comments
Open

Add the ability to add multiple :filter-expr #1252

maxim-lbmv opened this issue Apr 5, 2024 · 2 comments
Labels
enhancement Feature Request

Comments

@maxim-lbmv
Copy link

If you have multiple filters, you can quickly switch between them. For example, I have several applications that generate logs, I can add several filters :filter-expr :log_procname = 'syslogd' to display them all, or quickly disable filters for those that are not currently interesting. Editing one filter every time you need to add or remove messages from the log is not very fast.

Using :filter-in combinations it is difficult to achieve this effect, because you need to filter a specific field, in my case the process name. That is, if I simply write :filter-in syslogd, then the output will include all messages containing syslogd, and not just those generated by the syslogd process.

@maxim-lbmv maxim-lbmv added the enhancement Feature Request label Apr 5, 2024
@tstack
Copy link
Owner

tstack commented Apr 5, 2024

Support for multiple :filter-exprs introduces a lot of UX issues. Can you provide some suggestions on how the whole flow would work? For example:

  • How are these separate expressions combined together? Are they OR'd together or AND'd or is the user allowed to combine them arbitrarily?
  • Right now, the :filter-expr command will fill the prompt the current expression. Will that be removed?
  • Does each expression have a name assigned to it by the user so that they can manipulate it?
  • ...

@maxim-lbmv
Copy link
Author

I think it's better to use the already existing :filter-in and :filter-out logic. Hence the answers to the questions.

How are these separate expressions combined together? Are they OR'd together or AND'd or is the user allowed to combine them arbitrarily?

They must be combined by OR, as happens with other filters

Right now, the :filter-expr command will fill the prompt the current expression. Will that be removed?

Yes, because the command creates a new filter

Does each expression have a name assigned to it by the user so that they can manipulate it?

Names are not needed, control is from the filters panel and the commands :delete-filter, :disable-filter, :enable-filter, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature Request
Projects
None yet
Development

No branches or pull requests

2 participants