saw

Fast, multi-purpose tool for AWS CloudWatch Logs
授权协议 MIT License
开发语言 JavaScript
所属分类 应用工具、 终端/远程登录
软件类型 开源软件
地区 不详
投 递 者 夏侯弘量
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Saw

saw is a multi-purpose tool for AWS CloudWatch Logs

Saw Gif

Run from Docker

docker run --rm -it -v ~/.aws:$HOME/.aws tbrock/saw

Installation

Mac OS X

brew tap TylerBrock/saw
brew install saw

Linux

Arch Linux (source)

# 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

Red Hat Based Distributions (Fedora/RHEL/CentOS/Amazon Linux)

rpm -i <link_to_rpm_you_need_from_releases>

Debian Based Distributions (Debian/Ubuntu)

wget <link_to_deb_you_need_from_releases>
sudo dpkg -i <the_deb_name>

Manual Install/Update

  • Install go
  • Configure your GOPATH and add $GOPATH/bin to your path
  • Run go get -u github.com/TylerBrock/saw

Windows Specifics

  • Add %GOPATH%/bin to your path (optional)
  • Run from gopath/bin (If not in your path)
    cd %GOPATH%/bin
    saw ...
    

Usage

  • Basic

    # Get list of log groups
    saw groups
    
    # Get list of streams for production log group
    saw streams production
  • Watch

    # Watch production log group
    saw watch production
    
    # Watch production log group streams for api
    saw watch production --prefix api
    
    # Watch production log group streams for api and filter for "error"
    saw watch production --prefix api --filter error
  • Get

    # Get production log group for the last 2 hours
    saw get production --start -2h
    
    # Get production log group for the last 2 hours and filter for "error"
    saw get production --start -2h --filter error
    
    # Get production log group for api between 26th June 2018 and 28th June 2018
    saw get production --prefix api --start 2018-06-26 --stop 2018-06-28

Features

  • 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 group
    • saw watch production --prefix api Stream logs from production log group with prefix "api"

Profile and Region Support

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'

Run Tests

From root of repository: go test -v ./...

TODO

  • Bash + ZSH completion of log groups + (streams?)
  • Create log streams and groups
  • Delete log streams and groups
  • Basic tests
  • vue写了点东西,ESLint没有禁用,一直在报 Expected '!==' and instead saw '!=' 还有 Expected '===' and instead saw '==' ,但是项目能够顺利运行,作为一个程序猿,看到error可能每个人心里都很烦吧,好了,话不多说,上货! ESLint的配置,一搜起码有一堆,看了一遍改起来倒是不难,可是Expected '===' an

  • PS:(内容并未全部完成,以下解析内容为个人推测的可能性,仅供学习交流参考,不对准确性和完整性负责) 对内容有异议的欢迎指正 SAW文件样例 样例文件内容,以此样例文件作为解析 1,0 BRD1,订单A BRD2,多层板A级12mm,2440,1220,999999,0,12,多层板A级12mm,, PNL1,订单A PNL2,床头中背板,多层板A级12mm,1326,436,10,1,0,0

  •   记一个 react 程序报的错误:Expected an assignment or function call and instead saw an expression,直译是:需要是一个函数调用或赋值,不过却是一个表达式。   这个错误让我摸不着头脑,反复看代码也没发现哪出问题了,最后在看到这篇文章的时候才发现是哪错了(箭头函数里的括号问题)。这里记录一下来加深印象,也给出现同样问题的朋

 相关资料
  • 7.1n-step TD Prediction The methods that usen-step backups are still TD methodsbecause theystill change an earlier estimate based on how it differs from a later estimate. n-step return:If t+n≥T(if the

  • MULTI 标记一个事务块的开始。 事务块内的多条命令会按照先后顺序被放进一个队列当中,最后由 EXEC 命令原子性(atomic)地执行。 可用版本: >= 1.2.0 时间复杂度: O(1)。 返回值: 总是返回 OK 。 redis> MULTI # 标记事务开始 OK redis> INCR user_id # 多条命令按顺序入队 QUEUED redis

  • MULTI 标记一个事务块的开始。 事务块内的多条命令会按照先后顺序被放进一个队列当中,最后由 EXEC 命令原子性(atomic)地执行。 可用版本: >= 1.2.0 时间复杂度: O(1)。 返回值: 总是返回 OK 。 redis> MULTI # 标记事务开始 OK redis> INCR user_id # 多条命令按顺序入队 QUEUED redis

  • 描述 (Description) 它通过将data-multi-expand为true,一次打开多个手风琴窗格。 例子 (Example) 以下示例演示了在基础中使用multi-expand accordion - <!doctype html> <head> <meta charset = "utf-8" /> <meta http-equiv = "x-ua-co

  • Multi-OTP 是一个PHP类,用来进行基于 OTP 一次性密码的用户 token 的强认证和管理。可创建、更新、删除 token,用户数据存储在单个文件中。可使用多种算法进行用户检查,包括 Mobile OTP (MOTP), OATH/HOTP (RFC 4226), and OATH/TOTP HOTP Time Based (RFC 4226 extension). 兼容 (iPhon

  • The unobtrusive Laravel package that makes your app multi tenant. Servingmultiple websites, each with one or more hostnames from the same codebase. Butwith clear separation of assets, database and the

  • Multi-Selection Live DEMO on appetize.io Check this project on dribbble Read how we did it on our blog ##Requirements Android SDK 17+ ##Usage Add to your root build.gradle: allprojects { repositories

  • CPUMiner-Multi This is a multi-threaded CPU miner,fork of pooler's cpuminer (see AUTHORS for list of contributors). Table of contents Algorithms Dependencies Download Build Usage instructions Donation