-
Notifications
You must be signed in to change notification settings - Fork 38
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
rpc: add regex pattern filtering to warnet logs
rpc
#576
base: main
Are you sure you want to change the base?
rpc: add regex pattern filtering to warnet logs
rpc
#576
Conversation
Thanks! This is a really nice idea and looks like it works well already. I think the implementation could be even more awesome if it worked a little more like the Lines 249 to 293 in 71cbcec
This gives you a "selector" to choose a running tank from. If you did fancy taking this approach, perhaps |
Hm, currently we have @ismaelsadeeq any interest in adding a We might also want to remove grep-logs entirely in the future in favor of |
Thank you @willcl-ark @josibake for your reviews. I will get back to this soon. |
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
3306f28
to
9d3e129
Compare
warnet bitcoin grep-logs
rpc to filter logs by tank namewarnet logs
rpc
8c98502
to
8f4ddd3
Compare
8f4ddd3
to
bef941d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have not encountered logs cli prior to your comment @josibake.
What I would like to do can even simply be done using logs rpc by piping the result of logs with grep command.
But I believe the approach you mentioned is cleaner and faster hence I updated the PR to your suggestion.
I force-pushed to implement it, and updated the PR description and title to match what the C.L does.
I think adding --all
option to logs
rpc, and getting rid of bitcoin grep-logs
can be added in a follow-up after this.
This PR updated the
warnet logs
rpc to now have an optional grep option which willtake a string value and filter tank logs based on regex matching with the passed string.
This can be tested by
warnet log tank-001 --grep "pattern"