phil.swenson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2006-Sep-12 22:29 UTC
pulling logger into lib classes
I have a fair number of files in the rails "lib" directory. These files don''t have visibility into the "logger" class instance that comes automatically with rails controllers and models. How do I include this functionality into my "lib" files? Thanks, 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 -~----------~----~----~----~------~----~------~--~---
On Sep 12, 2006, at 3:29 PM, phil.swenson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> > I have a fair number of files in the rails "lib" directory. These > files don''t have visibility into the "logger" class instance that > comes > automatically with rails controllers and models. How do I include > this > functionality into my "lib" files? > > Thanks, > philYou can use RAILS_DEFAULT_LOGGER in your lib code. Or add a method like this: def logger RAILS_DEFAULT_LOGGER end -Ezra --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---