korobi / Korobi

https://docs.korobi.io/
10 stars 3 forks source link

Tail should be destructive WRT the oldest logs on the page #74

Closed lol768 closed 4 years ago

lol768 commented 9 years ago

In the same way the actual command works in unix/linux.

IMO 30 should also become 20 so the logs fit on one page without scrolling.

bendem commented 9 years ago

tail -f file just prints the new content of the file, it doesn't remove the oldest line when a new one is printed past the limit, does it?

I personally don't think that behavior is needed, but it'd be really easy to implement.

If the scroll is the problem, we could also track the current scroll offset, if it's at the bottom, follow the logs as they get added, if not, don't do anything.

lol768 commented 9 years ago

You're correct in that tail -f does the same as our tail page. I was referring more to tail -n 30 or similar where only the last 30 lines are shown.

Scrolling is the annoying part. IMO, the tail is best suited to having a page where you can quickly see the latest messages in the channel at a glance whilst still being able to see the navbar, headings etc and interact with the links etc.