Phương Nguyễn
Phương Nguyễn

Reputation: 8915

Where is the web server log file of Rails running on Passenger Nginx?

I know it's quite a dummy question but cannot figure it out my self: I have a Rails server running on Passenger Nginx. I notice that there is 3 logs file that may be related: $app/current/logs/production.log and $nginx/logs/access.log and $nginx/logs/error.log. Recently my app encounter an errors. I expect the error being dumped to either of the 3 files above. But in fact, when I looked at them, none contains the error. The production.log contains nothing except the assets compilation output. The access.log and error.log contains just very basic logging from nginx itself.

I didn't customize anything about Rails.logger in my app.

What I am missing? Where can I look for the app error now?

Upvotes: 1

Views: 3729

Answers (1)

Phương Nguyễn
Phương Nguyễn

Reputation: 8915

Josh, it's turn out to be a recent issue of Rails (3.2.1 which I'm running on). There is a fix suggested by @babatakao (as specified on https://github.com/rails/rails/issues/4277):

Rails.logger.instance_variable_get(:@logger).instance_variable_get(:@log_dest).sync = true if Rails.logger

Upvotes: 1

Related Questions