Is the specified record to be logged? Returns zero for no,
        nonzero for yes. If deemed appropriate, the record may be modified
        in-place by this method.

        :param logging.LogRecord record: The log record to process
        :rtype: int
194005
def filter(self, record):
        
        if self._exists:
            return int(getattr(record, 'correlation_id', None) is not None)
        return int(getattr(record, 'correlation_id', None) is None)
922529
def log(self, *args, **kwargs):
        
        if self.suppress_errors:
            try:
                self._log(*args, **kwargs)
                return True
            except:
                return False
        else:
            self._log(*args, **kwargs)
            return True
207514
private void processSingleRecord(Record record) {
        // TODO Add your own record processing logic here

        String data = null;
        try {
            // For this app, we interpret the payload as UTF-8 chars.
            data = decoder.decode(record.getData()).toString();
            // Assume this record came from AmazonKinesisSample and log its age.
            long recordCreateTime = new Long(data.substring("testData-".length()));
            long ageOfRecordInMillis = System.currentTimeMillis() - recordCreateTime;

            LOG.info(record.getSequenceNumber() + ", " + record.getPartitionKey() + ", " + data + ", Created "
                    + ageOfRecordInMillis + " milliseconds ago.");
        } catch (NumberFormatException e) {
            LOG.info("Record does not match sample record format. Ignoring record with data; " + data);
        } catch (CharacterCodingException e) {
            LOG.error("Malformed data: " + data, e);
        }
    }
535352
def record(self):
        # type: () -> bytes
        '''
        
        '''
        if not self._initialized:
            raise pycdlibexception.PyCdlibInternalError('RE record not yet initialized!')

        return b'RE' + struct.pack('=BB', RRRERecord.length(), SU_ENTRY_VERSION)
1344934
def is_recording():
    
    curr = ctypes.c_bool()
    check_call(_LIB.MXAutogradIsRecording(ctypes.byref(curr)))
    return curr.value
1116739
def record(self):
        # type: () -> bytes
        '''
        
        '''
        if not self._initialized:
            raise pycdlibexception.PyCdlibInternalError('PL record not yet initialized!')

        return b'PL' + struct.pack('=BBLL', RRPLRecord.length(), SU_ENTRY_VERSION, self.parent_log_block_num, utils.swab_32bit(self.parent_log_block_num))
841713
def should_rollover(self, record: LogRecord) -> bool:
        
        t = int(time.time())
        if t >= self.rollover_at:
            return True
        return False
47006
def get_one_record(self, *args, **kwargs):
        

        records = self.call(*args, **kwargs)
        records = list(records)
        len_ = len(records)

        if len_ != 1:
            raise ValueError("We were told to only return one record, but "
                             "this did not match what was given: (%d)" % 
                             (len_,))

        return records[0]
1116271
def records0(self, tag=None):
        
        _log.debug("in records0")
        for offset, xtag in self.index0:
            _log.debug("    records0: offset: %s; xtag: %s", offset, xtag)
            if tag is None or tag == xtag:
                yield self.read_record(offset)
113715
def should_log(self, request, response):
        
        return self.logging_methods == '__all__' or request.method in self.logging_methods
146417
def format(self, record):
        
        out = dict(
            Timestamp=int(record.created * 1e9),
            Type=record.name,
            Logger=self.logger_name,
            Hostname=self.hostname,
            EnvVersion=self.LOGGING_FORMAT_VERSION,
            Severity=self.SYSLOG_LEVEL_MAP.get(record.levelno,
                                               self.DEFAULT_SYSLOG_LEVEL),
            Pid=record.process,
        )

        # Include any custom attributes set on the record.
        # These would usually be collected metrics data.
        fields = dict()
        for key, value in record.__dict__.items():
            if key not in self.EXCLUDED_LOGRECORD_ATTRS:
                fields[key] = value

        # Only include the 'message' key if it has useful content
        # and is not already a JSON blob.
        message = record.getMessage()
        if message:
            if not message.startswith("{") and not message.endswith("}"):
                fields["msg"] = message

        # If there is an error, format it for nice output.
        if record.exc_info is not None:
            fields["error"] = repr(record.exc_info[1])
            fields["traceback"] = safer_format_traceback(*record.exc_info)

        out['Fields'] = fields

        return json.dumps(out)
1233198
def record(self):
        # type: () -> bytes
        '''
        
        '''
        if not self._initialized:
            raise pycdlibexception.PyCdlibInternalError('ES record not yet initialized!')

        return b'ES' + struct.pack('=BBB', RRESRecord.length(), SU_ENTRY_VERSION, self.extension_sequence)
787871
public void publish(LogRecord record)
  {
    if (! isLoggable(record))
      return;

    if (_handler != null)
      _handler.publish(record);
  }
129041
public boolean processThisRecord(Record record)
    {
        if (record == null)
            return false;
        boolean bPhysicalName = true;
        if (DBConstants.TRUE.equalsIgnoreCase(this.getProperty(USE_DATABASE_NAME)))
            bPhysicalName = false;
        String strFilename = record.getArchiveFilename(bPhysicalName);
        if (this.getProperty(ConvertCode.DIR_PREFIX) != null)
            strFilename = Utility.addToPath(this.getProperty(ConvertCode.DIR_PREFIX), strFilename);
        
        String strMode = this.getProperty(TRANSFER_MODE);
        boolean bExport = true;
        if (strMode != null) if (strMode.equalsIgnoreCase(IMPORT))
            bExport = false;
        if (bExport)
        {
            int oldOpenMode = record.getOpenMode();
            record.setOpenMode(oldOpenMode & ~DBConstants.OPEN_DONT_CREATE);
            // Make sure the record exists
            try {
                record.open();
                if ((record.getEditMode() != DBConstants.EDIT_CURRENT) && (!record.hasNext()))  // Control file would read current
                    if (!DBConstants.TRUE.equalsIgnoreCase(this.getProperty("importEmptyFiles")))
                        return false;   // Skip empty files (default)
                record.close();
            } catch (DBException e) {
                return false; // Record doesn't exist
            }
            if (this.getProperty(LOCALE) != null)
            {
                if (!record.getTable().getDatabase().getDatabaseName(false).endsWith("_" + this.getProperty(LOCALE).toString()))
                    return false;     // If locale is set, only do locale tables
                if (DatabaseInfo.DATABASE_INFO_FILE.equalsIgnoreCase(record.getTable().getDatabase().getDatabaseName(false)))
                    return false;     // This is a special file type
            }
        }
        else
        { // Import must have file.
            if (!(new File(strFilename).exists()))
                return false;
            if (this.getProperty(LOCALE) != null)
            {
                if (!record.getTable().getDatabase().getDatabaseName(false).endsWith("_" + this.getProperty(LOCALE).toString()))
                    return false;     // If locale is set, only do locale tables
                if (DatabaseInfo.DATABASE_INFO_FILE.equalsIgnoreCase(record.getTable().getDatabase().getDatabaseName(false)))
                    return false;     // This is a special file type
            }
        }
        XmlInOut xml = new XmlInOut(this, null, null);    //0 v
        boolean bSuccess = false;
        if (bExport)
            bSuccess = xml.exportXML(record.getTable(), strFilename);
        else
            bSuccess = xml.importXML(record.getTable(), strFilename, null);
        xml.free();
        return bSuccess;
    }
1336076
def currentRecord(self):
        
        item = self.currentItem()
        if isinstance(item, XOrbRecordItem):
            return item.record()
        return None
1361967
def record(self):
        # type: () -> bytes
        '''
        
        '''
        if not self._initialized:
            raise pycdlibexception.PyCdlibInternalError('RR record not yet initialized!')

        return b'RR' + struct.pack('=BBB', RRRRRecord.length(), SU_ENTRY_VERSION, self.rr_flags)
816135
def record(self):
        # type: () -> bytes
        '''
        
        '''
        if not self._initialized:
            raise pycdlibexception.PyCdlibInternalError('NM record not yet initialized!')

        return b'NM' + struct.pack(b'=BBB', RRNMRecord.length(self.posix_name), SU_ENTRY_VERSION, self.posix_name_flags) + self.posix_name