In the past I thought I was just crazy. I may be, but my production log is not at all responding to some requests. I am POSTing images to my rails app from a mobile client, then GETting a refreshed view in a web browser. The changed record is plainly visible. None of the above is showing up in my production log, but similar requests were logged an hour ago. I haven't changed any config files. I haven't restarted my server. Any suggestions as to why this is happening?
相关问题
- firebase storage cors strange Behaviour
- Eager-loading association count with Arel (Rails 3
- I want to trace logs using a Macro multi parameter
- Error message 'No handlers could be found for
- convert logback.xml to log4j.properties
相关文章
- how do I log requests and responses for debugging
- “No explicit conversion of Symbol into String” for
- Rspec controller error expecting <“index”> but
- Factory_girl has_one relation with validates_prese
- Rails: Twitter Bootstrap Buttons when visited get
- is there a “rails” way to redirect if mobile brows
- Got ActiveRecord::AssociationTypeMismatch on model
- Android Studio doesn't display logs by package
I solved the Problem by putting
into my config/initializers/...
In my case first i added
config.log_level = :debug
toproduction.rb
file then i had to create theproduction.log
file (in the log folder), then giving appropriate permissions withchmod
command.I had the same problem related to production log.
To trace back issue with web server:
Message from application: Permission denied - /var/www/APPLICATION-NAME/log/invitation.log (Errno::EACCES)
using the comman ll you will get log permissions
Solution: Have to change owner from root to other user:
Now use
ll
to see the permissionsRestart you web server:
now check production logs.
Check what value is set to
in your
FYI
So if you set the level to fatal only serious errors will be logged. If you set it to debug almost everything will be logged. By default in production it is set to warn. This is with good reason. As you don't want huge log files piling up on your production server for no reason.
Low memory is the most likely cause that I have been able to come up with. I will post here if I can prove it.