Re: logging in model

Bob Showalter
2007-10-30T14:04:14Z

On 10/30/07, Identry <identry-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:
> When I try to use logger in a model, I get a NameError:
>
> for example,
>
> class ItemFactory

where is "< ActiveRecord::Base" ?

>   def getItemById(id)
>     logger.info("getItemById #{id}")
>   end
> end
>
> produces...
>
> NameError: undefined local variable or method `logger'' for
> #<ItemFactory:0x327362c>