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

Unable to json-filter using -g #263

Open
Lewenhaupt opened this issue Jan 3, 2024 · 0 comments
Open

Unable to json-filter using -g #263

Lewenhaupt opened this issue Jan 3, 2024 · 0 comments

Comments

@Lewenhaupt
Copy link

Describe the bug
I have the following filter expression which works perfectly fine in the AWS Console {$.service="service-name"}.
Works using aws logs filter-log-events --filter-pattern '{$.service="service-name"}' --log-group-name "log-group-name".
But I cannot get it to work using cw.
Closest I got it to "working" is cw tail "log-group-name" -g="\"{$.service="service-name"}\"" as that at least doesn't crash but it still result in no events.

To Reproduce
cw tail "log-group-name" -g="\"{$.service="service-name"}\""

Expected behavior
It should be possible to provide cw with the same filter expression as in cloudwatch console. I suspect this is just a matter on how to properly pass it to the sdk but none of the docs state how to achieve it.

Desktop (please complete the following information):

  • OS: MacOs 14.2
  • Terminal zsh
  • cw version 4.1.3
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

No branches or pull requests

1 participant