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

Allow filtering pod logs by regex #11455

Open
dhirschfeld opened this issue Nov 28, 2022 · 1 comment
Open

Allow filtering pod logs by regex #11455

dhirschfeld opened this issue Nov 28, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@dhirschfeld
Copy link

Summary

The ability to filter pod logs is very useful however it appears that you can only filter by simple strings. This feature would be even more useful if you could provide a regex to use to filter the logs.

Motivation

e.g. I want to filter out DEBUG and TRACE logs, or only include WARNING or ERROR logs, or generally to filter by more than one condition. Other examples might be to only see logs from one of several functions or urls etc.

Proposal

It looks like re.Match could be used here instead of strings.Contains?

lineContainsFilter := strings.Contains(entry.line, literal)

@dhirschfeld dhirschfeld added the enhancement New feature or request label Nov 28, 2022
@dhirschfeld
Copy link
Author

It appears the original feature was implemented in #5319

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

No branches or pull requests

1 participant