saw is a multi-purpose tool for AWS CloudWatch Logs

docker run --rm -it -v ~/.aws:/home/.aws tbrock/saw
brew tap TylerBrock/saw
brew install saw
# Using pacaur
pacaur -S saw
# Using trizen
trizen -S saw
# Using yaourt
yaourt -S saw
# Using makepkg
git clone https://aur.archlinux.org/saw.git
cd saw
makepkg -sri
rpm -i <link_to_rpm_you_need_from_releases>
wget <link_to_deb_you_need_from_releases>
sudo dpkg -i <the_deb_name>
GOPATH and add $GOPATH/bin to your pathgo get -u github.com/TylerBrock/sawDOS .bat
cd %GOPATH%/bin
saw ...Basic ```sh # Get list of log groups saw groups
saw streams production ```
Watch ```sh # Watch production log group saw watch production
saw watch production --prefix api
saw watch production --prefix api --filter error ```
Get ```sh # Get production log group for the last 2 hours saw get production --start -2h
saw get production --start -2h --filter error
saw get production --prefix api --start 2018-06-26 --stop 2018-06-28 ```
Colorized output that can be formatted in various ways
--expand Explode JSON objects using indenting--rawString Print JSON strings instead of escaping ("\n", ...)--invert Invert white colors to black for light color schemes--raw, or --pretty, for watch and get commands respectively, toggles display of the timestamp and stream name prefix.Filter logs using CloudWatch patterns
--filter foo Filter logs for the text "foo"Watch aggregated interleaved streams across a log group
saw watch production Stream logs from production log groupsaw watch production --prefix api Stream logs from production log group with prefix "api"By default Saw uses the region and credentials in your default profile. You can override these to your liking using the command line flags:
# Use personal profile
saw groups --profile personal
# Use us-west-1 region
saw groups --region us-west-1
Alternatively you can hard code these in your shell's init scripts (bashrc, zshrc, etc...):
# Export profile and region that override the default
export AWS_PROFILE='work_profile'
export AWS_REGION='us-west-1'
From root of repository: go test -v ./...