logging in model

Identry
2007-10-30T13:35:20Z

When I try to use logger in a model, I get a NameError:

for example,

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

produces...

NameError: undefined local variable or method `logger'' for
#<ItemFactory:0x327362c>
    /Users/jalmberg/rails/tstools/config/../app/models/item_factory.rb:3:in
`getItemById''
    test/unit/company_test.rb:17:in `test_item_factory''

I get the same kind of error when I try to use logger in unit tests, like:

def test_item_factory
    item = itemFactory.getItemById(target_lot)
    assert_equal item[''lot_number''], target_lot
    logger.info("found lot # #{item[''lot_number'']}")
  end

What am I doing wrong? Do I need to import the logger object into the model
or test namespace? Some other trick?

TIA: John