Hi folks, I''ve a Rails 2.3.2 app where I want to save some AR queries of certain section of the app to the a DB table, so I''ve implemented this with a custom Middleware and I''ve made some customizations to some AR methods: http://gist.github.com/1198039 The problem is I''m getting ''stack level too deep'' error and I can''t find the path to that infinite recursion. Is there a better way to make this task? Note: I know Rails 3 has a Notification Api, but I can''t migrate all the app to Rails 3 at the time. Thanks! -- 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.
Michael Pavling
2011-Sep-08 08:11 UTC
Re: Log ActiveRecord queries to DB table in Rails 2.3
On 7 September 2011 17:42, rdavila <ruben.grunge84-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> The problem is I''m getting ''stack level too deep'' error and I can''t > find the path to that infinite recursion. Is there a better way to > make this task?You''ll probably find that your "INSERT INTO syspanel_sql_logs...." query is attempting to be logged... so it''s recursing into the log_with_syspanel_logger method. How about before you execute that query you turn off your extended logging, then turn it on again after? -- 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.