phil.swenson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2006-Nov-06 04:56 UTC
using the rails logger in an non-AR model
How do I make my non-AR model have visibility to the rails logger? I assume there is an include I need to use, but not sure what it is. I''m also trying to get my error mailer working for any errors in my non-AR models. Any help would be appreciated! thx phil --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
just declare
logger = ActiveRecord::Base.logger
and then you can use logger normally.
-f
On 11/5/06, phil.swenson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
<phil.swenson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:>
> How do I make my non-AR model have visibility to the rails logger? I
> assume there is an include I need to use, but not sure what it is.
I''m
> also trying to get my error mailer working for any errors in my non-AR
> models. Any help would be appreciated!
>
> thx
> phil
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---