TylerBrock / saw

Fast, multi-purpose tool for AWS CloudWatch Logs
MIT License
1.4k stars 77 forks source link

Perform query or highlight particular issues #6

Open kaihendry opened 6 years ago

kaihendry commented 6 years ago

Is it possible to apply a filter on the tail, or how do people for example highlight 500 errors whilst tailing http logs? e.g. [..., request = *HTTP*, status_code = 5**, bytes, referrer, agent]

TylerBrock commented 6 years ago

Hey, sorry for the delay getting back to you here.

You can definitely apply a filter to the tail using the --filter flag. You can check out the filter and pattern syntax docs to see what's possible.

Currently we don't highlight matches but that would be a great feature albeit somewhat difficult to implement as we'd have to match amazons filtering logic 1-to-1.

kaihendry commented 6 years ago

Hi, what is I want to do a filter [..., request = *HTTP*, status_code = 5**, , ,] on the last couple of days of logs in a log group? How would I go about it besides using the sluggish AWS console?

Many thanks!