awslogs icon indicating copy to clipboard operation
awslogs copied to clipboard

Add `--json` flag

Open soar opened this issue 2 years ago • 1 comments

This flag adds an ability to print JSON lines as formatted (and, optionally, highlighted) text. Supports --query and --color options.

Before:

awslogs get RDSOSMetrics instance-id --query '{engine: engine, uptime: uptime, processList: processList}'
Screenshot Before

After:

awslogs get RDSOSMetrics instance-id --query '{engine: engine, uptime: uptime, processList: processList}' --json
Screenshot After

Updated to match the new code style. Conflicts fixed. The old version is still available in the fork here: https://github.com/soar/awslogs/tree/feature/pretty-json-legacy

soar avatar May 29 '22 20:05 soar