Hi -- On Wed, 8 Mar 2006, James Edward Gray II wrote: > On Mar 8, 2006, at 3:01 AM, Talha Oktay wrote: > >> When I qualify log with $ as >> $log, it becomes global and I no longer receive error. I have tried it >> qualifying with @ etc. but the received the same error. > > No, this works too (after you fix your Logger constructor call): > > require 'logger' > > @log = Logger.new("test.log") #some other logger settings are ignored. > > def func > @log.debug "a statement" # error is reported here when func is called below That's a different @log from the one you assigned to, though. David -- David A. Black (dblack / wobblini.net) Ruby Power and Light, LLC (http://www.rubypowerandlight.com) "Ruby for Rails" chapters now available from Manning Early Access Program! http://www.manning.com/books/black