TylerBrock / saw

Fast, multi-purpose tool for AWS CloudWatch Logs
MIT License
1.41k stars 79 forks source link

Add --tail option to watch #23

Open egyptianbman opened 6 years ago

egyptianbman commented 6 years ago

Docker logs has a --tail <lines> option that allows you to "look back" by n number of lines. I usually wish I could look back a bit from the time I started watching the logs. Is this something that you'd be interested in adding to saw and if so, is it possible? I haven't had a chance to look at the code yet to see if I could implement it but wanted to gauge your interest first.

TylerBrock commented 6 years ago

Yeah that would be useful. I'm definitely into it.

joeflateau commented 5 years ago

I use this simple helper bash function:

function sawtailf(){
  group=$1
  saw get $group --pretty --start -1h
  saw watch $group
}