cw icon indicating copy to clipboard operation
cw copied to clipboard

Unable to json-filter using -g

Open Lewenhaupt opened this issue 2 years ago • 0 comments

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

Lewenhaupt avatar Jan 03 '24 11:01 Lewenhaupt