I want to display incomming requests to my web server in real time, in console. Each request should be represented by a single line with information about the request, i.e. client’s IP address, etc.
You can view server access log using standard Unix tools if you have privilege to view them. I would use something like su -c 'tail -f /var/log/apache2/error.log'. The su command executes shell as another user (root by default) and tail -f displays last 10 lines of the file and keeps displaying more as they arrive.
– PalecAug 16 '14 at 14:16
1
It would be interesting to know why you want this, @chris. Maybe then there will be a better answer. If you want to debug your server scripting code, maybe Stack Overflow will be a better fit for this question.
– PalecAug 16 '14 at 14:35
1
You can stream the log file using the command less logfile.log and press Shift + F and the file will stream so that you can read new request directly.
– Niklas RosencrantzAug 16 '14 at 23:39
su -c 'tail -f /var/log/apache2/error.log'. Thesucommand executes shell as another user (rootby default) andtail -fdisplays last 10 lines of the file and keeps displaying more as they arrive. – Palec Aug 16 '14 at 14:16less logfile.logand press Shift + F and the file will stream so that you can read new request directly. – Niklas Rosencrantz Aug 16 '14 at 23:39