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

cli: allow filtering by log stream #4440

Merged
merged 4 commits into from
Feb 22, 2024
Merged

Conversation

maminrayej
Copy link
Contributor

@maminrayej maminrayej commented Feb 6, 2024

Extends the app logs command to allow filtering different log streams.

Closes #4412 / RUN-69

@ayys
Copy link
Member

ayys commented Feb 7, 2024

@maminrayej Do you think it makes sense to do it like wasmer app logs --streams [stdout|stderr|all]? with all being the default.

@maminrayej
Copy link
Contributor Author

I think your suggestion of allowing the user to list the desired streams is better. It's going to be a little bit more awkward to parse, but I think it's worth it since if any more streams get added in the future, having --stream1 --stream2 --stream3 is ugly.

But I'm not the biggest fan of | between options. I prefer:

wasmer app logs --streams stdout, stderr

It's similar to how you can specify a set of features in Cargo:

cargo build --features "feature1, feature2"

What do you think?

@theduke theduke self-requested a review February 12, 2024 14:17
Copy link
Contributor

@theduke theduke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can potentially do this in a followup PR, but we should also allow client-side sorting of logs into streams.

And also allow filtering by instance ID.
I'm not sure if that was a separate issue or not.

lib/backend-api/src/types.rs Show resolved Hide resolved
lib/cli/src/commands/app/logs.rs Outdated Show resolved Hide resolved
@syrusakbary syrusakbary merged commit be3ea4f into master Feb 22, 2024
57 of 58 checks passed
@syrusakbary syrusakbary deleted the add-log-streams-options branch February 22, 2024 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Edge-CLI: instance logs: show log stream + allow filtering by log stream
4 participants