Console2 forces scroll bar to bottom when tailing a log

  • CSandwith

    CSandwith - 2013-11-18

    First, I'd like to say that Console2 (particularly when used with Cygwin) is absolutely awesome. I used OSX for awhile and ended up loving the stock Terminal application that packaged with it. I've been on a quest to more or less replicate that functionality set on Windows, and Console2+Cygwin covers about 95% of it, which is just great.

    My biggest issue, as of now, deals with executing the bash command tail -f on a file that is being appended to by an external process (like, say, Apache Tomcat).

    In OSX's terminal, if I am tailing a log, looking for some information (like a Java stack trace), and one appears, I have the option to hit the scroll bar, or scroll my mousewheel, and the terminal stops scrolling to follow the tail. The tail continues running, and if I scroll all the way to the "bottom" of the terminal, it will automatically follow the tail (just like console2), but it stops automatically following the tail if I'm NOT scrolled all the way to the bottom (Which is NOT what Console2 does; Console2 forces me back to the bottom of the terminal).

    I've worked around this by killing the tail process (Ctrl-C) and using vi or whatever to interrogate the log file once I find what I'm looking for, but I was wondering if there was a way to "fix" this (I put "fix" in quotes because, for all I know, some folks consider this a feature, not a nuisance).

    Thoughts, anyone?

  • Kirill

    Kirill - 2013-11-19

    Unfortunately, I don't see how it can be done given the way Console reads the output. However, you may be able to achieve very close results by using Stop Scrolling behaviour. There are couple settings - one is to use Scroll Lock and then there is a hotkey to stop scrolling [which by default is also set to Scroll Lock, I believe]. Invoking either of them would stop the auto-scroll. There will be somewhat undesired side effect of actually preventing the new output from appearing, but it would be similar to your workaround [except that you are not going to lose the tail output - just need to unlock the scroll to get all of it again].


Log in to post a comment.