jorgebastida / awslogs

AWS CloudWatch logs for Humans™
Other
4.86k stars 336 forks source link

How do I use hyphenated characters in filter pattern properties? #381

Closed alsdud154 closed 1 year ago

alsdud154 commented 1 year ago

I want to filter the thread name. Thread names contain characters that contain hyphens. How do I use hyphenated characters in filter pattern properties? I want to filter only ORDER-ITEM-1 in the red area as shown in the image.

This is the code I tried. awslogs get /ecs/cafe24-webhook ALL --s='3h' --profile cafe24 --filter-pattern "ORDER ITEM 1"

This is the code I want. But the filter doesn't work. awslogs get /ecs/cafe24-webhook ALL --s='3h' --profile cafe24 --filter-pattern "ORDER-ITEM-1"

image
leonroy commented 1 year ago

having this issue too...

alsdud154 commented 1 year ago

I was able to solve it by writing single quotes -> double quotes in filter-pattern.

awslogs get /ecs/cafe24-webhook ALL --s='3h' --profile cafe24 --filter-pattern='"ORDER-ITEM-1"'

alsdud154 commented 1 year ago

having this issue too...

I left a workaround.