15/12/2017 - LINUX, MAC, VAGRANT
In this example we are going to visualise apache access logs of our website. Our website is running on a Linux machine and Logstalgia visualising takes place in MacOS.
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
$ brew install logstalgia
If you want to Ubuntu instead, you can use commands below.
sudo apt-get update
sudo apt-get install logstalgia
Since I am running a my website in a vagrant box, it would be good to share my vagrant box configs.
...
config.vm.synced_folder "www", "/var/www/html", create: true, nfs: true, mount_options: ["actimeo=2"]
...
...
CustomLog /var/www/html/logs/website-access.log combined
...
Everytime I access to my website, the logs will be available under /var/www/html/logs/
in vagrant box and under /www/logs
in MacOS.
These assumptions applies to MacOS. Assuming that your website is accessible through http://192.168.99.10:8082/
and apache access logs are stored in /www/logs/website-access.log
.
MacBook-Pro:~ inanzzz$ tail -f /www/logs/website-access.log | logstalgia --sync
Run command above to open up the visualiser and start sending requests to your website. There is about 20 seconds delay in showing the logs so be patient.