Production log not working
Check what value is set to
config.log_level = :warn
in your
/rails_app/config/enviroments/production.rb
FYI
The available log levels are: :debug, :info, :warn, :error, :fatal.
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.
In my case I had the following gem rails_12factor
in my Gemfile
for production.
So I had to
- Remove
rails_12factor
from my Gemfile gem uninstall rails_12factor
bundle install
And on the next push to production the logs worked for me. FYI: I am using rails 5.2.1, but the rails web app started in rails 3.
In my case first i added config.log_level = :debug
to production.rb
file then i had to create the production.log
file (in the log folder), then giving appropriate permissions with chmod
command.