saw icon indicating copy to clipboard operation
saw copied to clipboard

support multi-group log commands

Open JeanMertz opened this issue 5 years ago • 3 comments

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:

  • get
  • streams
  • watch

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

JeanMertz avatar Nov 15 '19 22:11 JeanMertz

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

SodaGremlin avatar Aug 12 '20 19:08 SodaGremlin

+1 from me too, this would be amazing.

rgaino avatar May 04 '21 15:05 rgaino

+1 on this!

noudadrichem avatar Jan 14 '22 09:01 noudadrichem