代码之家  ›  专栏  ›  技术社区  ›  martins

我的Rails应用程序返回500,但在日志中看不到任何细节

  •  0
  • martins  · 技术社区  · 7 年前

    curl本地主机:3000/组 给予

    Started GET "/groups" for 193.160.199.32 at 2018-07-05 13:41:04 +0000
    Processing by GroupsController#index as */*
    Filter chain halted as :authenticate_user rendered or redirected
    Completed 500 Internal Server Error in 94ms (Views: 0.1ms)
    

    但为什么我看不到更多的细节?

    我已经准备好了 RAILS_ENV=staging

    [1] pry(main)> Rails.env
    => "staging"
    

    grep日志config/environments/staging.rb

      config.log_level = :debug
      # Prepend all log lines with the following tags.
      config.log_tags = [:request_id]
    
      config.log_formatter = ::Logger::Formatter.new
    
    0 回复  |  直到 7 年前