There are times when I’m debugging code on a linux box that I want to see what’s being logged by a Web Site or Web Application. What I used to have to do was do something on the website, then open up a terminal in Ubuntu (or any other linux distro for that matter) and view the logfile with either vim, nano, cat | less or gvim.
How I used text editors to do it
I use VIM as my default text editor on Ubuntu or any other linux distros (such as redhat, centos, debian, linux mint) that I work on.
A few weeks from now I used to use vim to open the log file, then the :e (edit) command to reload the new log entries.
Based on the entry, I make adjustments as required, then try again. Back to vim, issue the edit command, review the changes, then run the script again. So on and so forth.
Now this is kind of did what I wanted it to do, but what I really wanted it to do was display the log in realtime so that I can just keep going back to the terminal and see what’s wrong without having to do the additional second step of running the edit command.
The way of opening up a log file in a text editor, then reloading the log file in the editor was very cumbersome. I needed a way of seeing the log file in realtime so that I did not have to keep reloading.