Re: logging in model

Identry
2007-10-30T18:42:21Z

Bob/Raghu,

Thanks for your responses...

The ItemFactory model isn''t an ActiveRecord. I wonder if that could be
the
problem?

require ''logger''

This seems like a good idea, but it doesn''t work. I get the same error.

What does work, I''ve discovered, is using RAILS_DEFAULT_LOGGER, as in

class ItemFactory
   def getItemById(id)
      RAILS_DEFAULT_LOGGER.info("getItemById #{id}")
   end
end

Seems odd, I think. BTW, I''m using Rails 1.2.3.

-- John