Julien Palmas
2013-May-23 12:00 UTC
[Railties] Display the request_id in Rails::Rack::Logger#started_request_message
Hi list, Rails already generates a request id but I don''t see it used anywhere by default One nice place could be Rails::Rack::Logger#started_request_message. The log output would then be something like Started GET "/path" for 127.0.0.1 at 2013-05-23 13:00:29 +0200 request_id=123456789 This would even be more valuable for debugging when used in conjunction with heroku''s http_request_id lab''s feature ( https://devcenter.heroku.com/articles/http-request-id) and rack-timeout latest version (as per now : 0.1.0beta2 : https://github.com/kch/rack-timeout/tree/v0.1.0beta2) What do you think ? PS : Sorry for posting an issue on GH before sending to the ML (https://github.com/rails/rails/issues/10736) -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscribe@googlegroups.com. To post to this group, send email to rubyonrails-core@googlegroups.com. Visit this group at http://groups.google.com/group/rubyonrails-core?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Rafael Mendonça França
2013-May-24 03:21 UTC
Re: [Railties] Display the request_id in Rails::Rack::Logger#started_request_message
Have you checked the tagged log feature? You can add the request uuid on the logs easily. On May 23, 2013 11:04 AM, "Julien Palmas" <julien.palmas@gmail.com> wrote:> Hi list, > > Rails already generates a request id but I don''t see it used anywhere by > default > > One nice place could be Rails::Rack::Logger#started_request_message. The > log output would then be something like > > Started GET "/path" for 127.0.0.1 at 2013-05-23 13:00:29 +0200 request_id=123456789 > > This would even be more valuable for debugging when used in conjunction > with heroku''s http_request_id lab''s feature ( > https://devcenter.heroku.com/articles/http-request-id) and rack-timeout > latest version (as per now : 0.1.0beta2 : > https://github.com/kch/rack-timeout/tree/v0.1.0beta2) > > What do you think ? > > PS : Sorry for posting an issue on GH before sending to the ML ( > https://github.com/rails/rails/issues/10736) > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rubyonrails-core+unsubscribe@googlegroups.com. > To post to this group, send email to rubyonrails-core@googlegroups.com. > Visit this group at http://groups.google.com/group/rubyonrails-core?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscribe@googlegroups.com. To post to this group, send email to rubyonrails-core@googlegroups.com. Visit this group at http://groups.google.com/group/rubyonrails-core?hl=en. For more options, visit https://groups.google.com/groups/opt_out.