Tail -view logs

For example:

 

tail -f /var/log/upstart/gunicorn.log -n 500

tail -f /var/log/nginx/access.log -n 500

tail -f /var/log/nginx/error.log -n 500

For colored output:

sudo tail -f /var/log/nginx/access.log | sed -e ‘s/\(.* 200 .*\)/\o033[32m\1\o033[39m/’ -e ‘s/\(.* 301 .*\)/\o033[31m\1\o033[10m/’

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s