chris P
chris P

Reputation: 6589

Why can't I see any logging output from Rails on my heroku server?

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?

Upvotes: 0

Views: 2057

Answers (2)

Alex Edelstein
Alex Edelstein

Reputation: 528

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

Upvotes: 1

Andrey Turkin
Andrey Turkin

Reputation: 719

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)

Upvotes: 3

Related Questions