I'm using Capistrano 3 for deployment with my Rails app. The problem is that every time I deploy my app to the server the ./log/production.log file is reset. I've heard it's possible to have the production.log file into the shared folder and being appended at each deployment.
I thought this was made by default by Capistrano but apparently not for me :(
Any thoughts?
Thanks!
In your config/deploy.rb you need a line similar to this:
set :linked_dirs, %w{log public/system}
This will tell capistrano to symlink log
and public/system
into the shared directory on deployment.
来源:https://stackoverflow.com/questions/25693037/rails-capistrano-3-how-to-share-production-log-file-into-the-shared-folder-of