How to watch logs in real time via Terminal?
This is a basic question - in the movie "The Social Network" there are several scenes when the young Facebook staff is watching the PHP/Apache server logs on in their TERMINAL in real time.
I'm familiar with how to do this in a RUBY/RoR environment - but with a standard LAMP Apache/PHP environment, how to do actively monitor your server's actions in real time? I'm guessing there's an easy way to do this in Terminal.
Solution 1:
maybe they use tail -f
on the access log?
Solution 2:
Or even something like logstalgia ;-)
Solution 3:
or install and use multitail to specify filters and coloring :)
Solution 4:
If you are looking for a real-time Apache log viewer and analyzer, I would definitely recommend GoAccess.
http://goaccess.prosoftcorp.com/
You just run it as (no conf needed):
goaccess -f /var/log/apache2/access.log -s -b