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::DEBUGto myproduction.rbfile as specified here, here and here - Adding the
rails_12factorgem as specified by Heroku here - Added
ActiveRecord::Base.logger.level = Logger::DEBUGto myenvironment.rbfile as outlined here - Added
$stdout.sync = trueto myconfig.rufile 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"