Rails 4 application does not write to production.log, runs on Nginx, ubuntu and is deployed via capistrano

My application crashes when a customer places an order.

I really get desperation, as I need mine production.logto find out what the application breaks!

I went to :~/mystore/current/log$ nano production.log

And it looks like it has production.lognot been updated since 23/5 2017.

Here are the last lines from production.log

 I, [2017-05-23T11:12:35.067624 #1060]  INFO -- : Completed 404 Not Found in 27ms (ActiveRecord: 3.0ms)
F, [2017-05-23T11:12:35.069957 #1060] FATAL -- :
ActiveRecord::RecordNotFound (Couldn't find Label with 'id'=10):
  app/controllers/labels_controller.rb:21:in `set_label'

Now I don’t understand why my application crashes today. Which is strange, because I could always control performance withproduction.log

these are settings in production.rb

  config.log_level = :info

 config.logger = ActiveSupport::Logger.new('/tmp/foo.log') 
 config.logger.info "SMTP_ADDR: #{ENV["SMTP_ADDRESS"].inspect}"
 config.log_formatter = ::Logger::Formatter.new

In deploy.rbsim-linking, I don’t know if this has anything to do with this.

set :linked_files, %w{config/database.yml config/secrets.yml config/application.yml}
set :linked_dirs, %w{log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system}

The application runs on Nginxand deploys through Capistrano  Has anyone had this problem? Can anybody help me?

, , : , " "?

+4

Source: https://habr.com/ru/post/1686567/


All Articles