    # File lib/needle/logger.rb, line 65
        def write_to( device, shift_age = 0, shift_size = 1048576 )
          saved_critical = Thread.critical
          Thread.critical = true

          if device
            if device.respond_to?( :write ) && device.respond_to?( :close )
              @logdev = device
            else
              @logdev = Logger::LogDevice.new( device,
                :shift_age => shift_age,
                :shift_size => shift_size )
            end
          end

          device
        ensure
          Thread.critical = saved_critical
        end