I have a rails application on heroku. I want to look at real time server logs like in a local server. I tried this blog. The command heroku logs --tail lets me look at the blog but doesn't show database transactions. I want to be able to look at all database queries.
Asked
Active
Viewed 122 times
1
-
I think that you are talking not exactly about database logs. If you want to see rails ActionRecord transactions you need to switch your application ENV to development mode, or switch log level output to :debug in your production.rb. This is not recommended practice in production - so use it with care. – Alex Baidan Oct 06 '17 at 12:35
-
@OleksiiBaidan i already have `config.log_level = :debug` on my production.rb – tambakoo Oct 07 '17 at 14:13
-
well, this was just a direction where you need to search. In any case - think that the answer is already in this thread https://stackoverflow.com/questions/6427096/heroku-see-params-and-sql-activity-in-logs – Alex Baidan Oct 07 '17 at 17:26
-
@OleksiiBaidan thank you so much for the redirect! – tambakoo Oct 08 '17 at 16:07
1 Answers
0
To the production.rb
file add config.logger = Logger.new(STDOUT)
with the config.log_level = :debug

tambakoo
- 343
- 3
- 15