0

I am running a puma web server on heroku and wants to get the .log file to check why a record is being rollbacked. I tried using heroku run bash and tried searching for config in puma.rb, but I still don't know how..

Any suggestions?

edit: I don't want heroku logs -t as it is just showing the logs from puma output. I need the output which when you tail -f log/development.log will show, more detail.

The reason I need it is because I am having a record that rollbacks and I don't know why. It only happens in production not in development, so I have to find out why.

2015-07-28T11:01:26.688980+00:00 app[web.1]: Processing by Users::RegistrationsController#create as HTML
2015-07-28T11:01:26.689027+00:00 app[web.1]:   Parameters: {"utf8"=>"✓", "authenticity_token"=>"ocrYdS3Ysj8dM7A32k7ssBFndoRAJSpM+qlK5Sm2t3ROWm3pSEgAO1htfbSsc/j5FUUXZmRu0RuCp2g2tqfmPw==", "user"=>{"email"=>"ml@llmmllmm.com", "password"=>"[FILTERED]"}, "commit"=>"註冊"}
2015-07-28T11:01:26.812795+00:00 app[web.1]:   Identity Load (1.9ms)  SELECT  "identities".* FROM "identities" WHERE "identities"."email" = $1  ORDER BY "identities"."id" ASC LIMIT 1  [["email", "ml@llmmllmm.com"]]
2015-07-28T11:01:26.825136+00:00 app[web.1]:   User Exists (2.3ms)  SELECT  1 AS one FROM "users" WHERE "users"."referral_code" IS NULL LIMIT 1
2015-07-28T11:01:27.443614+00:00 heroku[router]: at=info method=POST path="/signup" host=new.carshare.hk request_id=c19ac7d2-7805-4c0e-b972-532264656737 fwd="220.241.70.37" dyno=web.1 connect=1ms service=766ms status=200 bytes=15584
2015-07-28T11:01:27.391858+00:00 app[web.1]:   FormUser Exists (13.0ms)  SELECT  1 AS one FROM "users" WHERE "users"."email" = 'ml@llmmllmm.com' LIMIT 1
2015-07-28T11:01:27.423934+00:00 app[web.1]:   Rendered svgs/_carshare_typeface_blue.html (0.6ms)
2015-07-28T11:01:27.426946+00:00 app[web.1]:   Rendered shared/_flash.html.slim (0.1ms)
2015-07-28T11:01:27.398227+00:00 app[web.1]:    (1.9ms)  ROLLBACK
Chris Yeung
  • 2,613
  • 6
  • 34
  • 57

1 Answers1

0

You can tail Heroku logs: heroku logs -t -a app-name https://devcenter.heroku.com/articles/logging

Also you can try out some addons on Heroku which will provide you with a in-browser view of your logs and allow some filtering on top of it - https://addons.heroku.com/?q=log

abhishek77in
  • 1,848
  • 21
  • 41