Gurdipe Dosanjh
2012-Jun-19 19:46 UTC
Extracting SQL statements from the rails development log
Hi I need to extract all the sql statements from the the rails development log. Is there a quick way to do this using a regular expression or another method? Kind Regards Gurdipe -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/6Z3-ZBq49_kJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Robert Walker
2012-Jun-19 22:54 UTC
Re: Extracting SQL statements from the rails development log
Gurdipe Dosanjh wrote in post #1065210:> I need to extract all the sql statements from the the rails development > log. > > Is there a quick way to do this using a regular expression or another > method?This makes it sound unlikely: http://stackoverflow.com/questions/139926/regular-expression-to-match-common-sql-syntax BTW, is your Google broken? This is was the second link in my Google. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Matt Jones
2012-Jun-20 11:54 UTC
Re: Extracting SQL statements from the rails development log
On Tuesday, 19 June 2012 15:46:12 UTC-4, Gurdipe Dosanjh wrote:> > Hi > > I need to extract all the sql statements from the the rails development > log. > > Is there a quick way to do this using a regular expression or another > method? > >If you''re looking to grab all the queries, check out the Notification system: http://asciicasts.com/episodes/249-notifications-in-rails-3 the ''sql.active_record'' notification will be fired every time there''s a query. --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/iAb7Rc5h9h4J. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.