How do I access my application logs?

September 8, 2013 7.1k views
I successfully deployed my ruby on rails app using a combination of this railscast and this tutorial . but my app is not fully working, How do I access my application logs? after ssh into my vps?
2 Answers
The output log is found in /home/username/apps/projectname/current/log/unicorn.log.

You can use the 'tail' command to output the last X lines of the file, or less to read all of it (type G (yes, it has to be uppercase) to reach the end of the file after running less.

#output the last few lines

tail /home/username/apps/projectname/current/log/unicorn.log
#output the last 40 lines
tail -40 /home/username/apps/projectname/current/log/unicorn.log

#read using less
less /home/username/apps/projectname/current/log/unicorn.log

@kamaln7 how do I view the logs from the droplet? Or is this command for the droplet (didnt work for me)

Have another answer? Share your knowledge.