TylerBrock / saw

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

support multi-group log commands #43

Open JeanMertz opened 4 years ago

JeanMertz commented 4 years ago

With this change, the first argument to the command is parsed as a regular expression and matched against the list of available log groups. For each matched log group, the relevant command is executed in parallel.

The following commands support this pattern:

The log group name is added to the formatted log output, to distinguish logs from different log groups.

If you want to get an idential result as what you got before this commit, you would have to wrap your group name in regular expression begin and end tokens, meaning this:

saw stream "my-log-group"

Must now be written as:

saw stream "^my-log-group$"

Example output with two groups (test and test2):

saw watch test
[2019-11-15T23:03:05+01:00] (test:stream) Example Event 1
[2019-11-15T23:03:05+01:00] (test2:stream2) Example Event 1

Note that the saw get command makes no attempt to time-sort the events cross-groups.

Closes #38

SodaGremlin commented 4 years ago

+1, I would love to see this as part of the project.

rgaino commented 3 years ago

+1 from me too, this would be amazing.

noudadrichem commented 2 years ago

+1 on this!