TylerBrock/saw

Add --tail option to watch

egyptianbman opened this issue · 2 comments

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.

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

I use this simple helper bash function:

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