【问题标题】:Issue with creating log in production mode using Rails Logger使用 Rails Logger 在生产模式下创建日志的问题
【发布时间】:2015-07-06 14:25:50
【问题描述】:

我在(Ubuntu 14.04 + Passenger + apache2)组合服务器中托管了我的 Rails 3.2.13 应用程序。

在开发环境中一切正常;但在生产环境中。我收到如下错误:-

在浏览器中

We're sorry, but something went wrong.
We've been notified about this issue and we'll take a look at it shortly.

然后,我决定在log/production.log 中获取日志报告并进行如下更改。

/config/environments/production.rb 文件中:

config.consider_all_requests_local = true
config.log_level = :debug
Rails.logger = Logger.new(STDOUT)
Rails.logger = Log4r::Logger.new("Application Log")

即使在/log/production.log 文件中也没有创建日志报告

我还需要做什么吗?请有人帮助我解决这个问题。

【问题讨论】:

标签: ruby-on-rails-3 apache ruby-on-rails-4 testing passenger


【解决方案1】:

这里是乘客作者。除了 Rails 日志文件,您还应该查看 Web 服务器错误日志。在the Passenger documentation's troubleshooting section.了解更多信息

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-04-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多