=========
This is a work-in-progress, use it at your own risk
A CLI to query CloudWatch Logs with additional features for JSON logs.
I wanted a CLI that will allow me to write powerful queries for JSON logs and none of the existing ones seem to work that well with queries. Also, programming is fun.
$ npm install -g river
$ river COMMAND
running command...
$ river (-v|--version|version)
river/0.1.0 darwin-x64 node-v12.22.6
$ river --help [COMMAND]
USAGE
$ river COMMAND
...
display help for river
USAGE
$ river help [COMMAND]
ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLI
See code: @oclif/plugin-help
Query a batch of logs from CloudWatch
USAGE
$ river query LOGGROUPNAME
ARGUMENTS
LOGGROUPNAME The name of the log group to query
OPTIONS
--from=from Start of date range to get logs from
--indent=indent Number of spaces used to indent output for JSON logs
--logStreamNamePrefix=logStreamNamePrefix A prefix used to filter logs. Only logs from a log stream matching the
prefix will be returned
--logStreamNames=logStreamNames Names of log streams to get logs from
--query=query A JSONPath query ran against the log events list. Queries are run on log
pages, so if you do something like $[1].record it'll give you the first
record on every log page, not the first record overall
--timeZone=timeZone Optional time zone. Logs will be filtered using this time zone if to or
from are provided in addition to dates being printed in the specified time
zone
--to=to End of date range to get logs from
See code: src/commands/query.ts
USAGE
$ river tail
See code: src/commands/tail.ts