简体   繁体   English

Ubuntu 14.04中的production.log在哪里-Rails 4

[英]Where is the production.log in Ubuntu 14.04 - Rails 4

I have an Ubuntu 14.04 in OpsWorks and I have in my production.rb file this configuration: 我在OpsWorks中具有Ubuntu 14.04,并且在production.rb文件中具有以下配置:

config.log_level = :debug

The problem is that I can not find the production.log in my server, I read that probably is because the user that runs the application doesn't have the correct permission to write the file. 问题是我无法在服务器上找到production.log,我读到的原因可能是因为运行该应用程序的用户没有正确的权限来写入文件。 What is the correct path for production.log? production.log的正确路径是什么? If the problem is users permissions where I can change it in Opsworks? 如果问题出在用户权限上,我可以在Opsworks中更改它?

You should add stderr_path and stdout_path to your unicorn.rb If you don't write their methods, unicorn's default output path is /dev/null when daemonized. 您应该将stderr_pathstdout_path添加到unicorn.rb如果不编写它们的方法,则unicorn.rb unicorn的默认输出路径为/dev/null

# #{Rails.root}/config/unicorn.rb
stderr_path "#{Rails.root}/log/unicorn_error_#{Rails.env}.log"
stdout_path "#{Rails.root}/log/unicorn_#{Rails.env}.log"

More Detail is Unicorn Congigular 更详细的是独角兽Congigular

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM