If I try things like
puts "12345"
or
logger.debug "abcde"
in my controller, and then access, that controller... I then run
heroku logs
or
heroku logs -n 1000
and I do not see any of the logging output. How can I output logs to my heroku server and view them?
From Heroku docs :
... when using the Ruby on Rails TaggedLogger by ActiveSupport, you should add the following into your app's configuration to get stdout logging:
config.logger = Logger.new(STDOUT)
we found that the easiest thing to do here is to install the add-on "Papertrail" from the heroku add-ons page. When you then click on Papertrail on your Resources tab, you get a good log view
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.