How to use config.log_tags with Heroku

I added config.log_tags = [:uuid, :remote_ip]

to my files development.rb

, test.rb

and production.rb

, and I can see these fields when I run locally (development).

However, when I deploy to Heroku, it looks like standard logging is taking over and I don't see the extra fields. Other changes have occurred in the same deployment, so I am assuming Heroku is overriding my logging configuration (as it does with database configuration).

Any idea how I can add these fields to the log?

Thank!

+3


source to share


1 answer


Check out this heroku blog post about using HTTP Request IDs which says:

HTTP Request IDs are now included in all Heroku applications.

They just enabled this feature (since Feb 14) on their platform so you can now see the UUID / x-Request-ID in their logs. This should do the trick in your config/environments/production.rb

:



config.log_tags = [ :uuid ]

      

You can find out more about this in the center of the hero .

0


source







All Articles