So there a couple of similar questions regarding this but I've tried all of the answers and still can not get my app to do simple logging.
I'm using Rails 4.2
, Ruby 2.2
, Puma
on a Heroku
free account; So far I've tried:
- Adding
config.logger = Logger.new(STDOUT)
,config.log_level = :debug
, andconfig.logger.level = Logger::DEBUG
to myproduction.rb
file as specified here, here and here - Adding the
rails_12factor
gem as specified by Heroku here - Added
ActiveRecord::Base.logger.level = Logger::DEBUG
to myenvironment.rb
file as outlined here - Added
$stdout.sync = true
to myconfig.ru
file as outlined here
In my app I have the following (none of which I can see in production when using $ heroku logs --tail
nor in papertrail
)
Rails::logger.debug "Test of 'Rails::logger.debug' logging"
Rails.logger.debug "Test of 'Rails.logger.debug' logging"
puts "Test of 'puts' logging"