def add(severity, message=nil, progname=nil, &block)
      severity ||= UNKNOWN
      # We don't want to audit logs that are less than our level
      return true if severity < @level
      progname ||= @progname
      if message.nil?
        if block_given?
          message = yield
        else
          message = progname
          progname = @progname
        end
      end
      return true if is_filtered?(severity, message)
      msg = format_message(format_severity(severity), Time.now, progname, message)
      case severity
      when Logger::INFO, Logger::WARN, Logger::UNKNOWN, Logger::DEBUG
        AuditStub.instance.append_output(msg)
      when Logger::ERROR
        AuditStub.instance.append_error(msg)
      when Logger::FATAL
        AuditStub.instance.append_error(msg, :category => RightScale::EventCategories::CATEGORY_ERROR)
      end
      true
    end
def add(severity, message=nil, progname=nil, &block)
      severity ||= UNKNOWN
      # We don't want to audit logs that are less than our level
      return true if severity < @level
      progname ||= @progname
      if message.nil?
        if block_given?
          message = yield
        else
          message = progname
          progname = @progname
        end
      end
      return true if is_filtered?(severity, message)
      msg = format_message(format_severity(severity), Time.now, progname, message)
      case severity
      when Logger::INFO, Logger::WARN, Logger::UNKNOWN, Logger::DEBUG
        AuditStub.instance.append_output(msg)
      when Logger::ERROR
        AuditStub.instance.append_error(msg)
      when Logger::FATAL
        AuditStub.instance.append_error(msg, :category => RightScale::EventCategories::CATEGORY_ERROR)
      end
      true
    end
Override Logger::add to audit instead of writing to log file

 === Parameters
 severity(Constant):: One of Logger::DEBUG, Logger::INFO, Logger::WARN, Logger::ERROR or Logger::FATAL
 message(String):: Message to be audited
 progname(String):: Override default program name for that audit

 === Block
 Call given Block if any to build message if +message+ is nil

 === Return
 true:: Always return true