Write a pre-formated record. This is used for when we have
signed and/or encrypted audit records.

@param record
427065
public synchronized void writeRecord(byte[] record, String header) {
        long length = record.length + nlen;
        PrintStream ps = getPrintStream(length, header);
        if (isWindows)
            ps.write(record, 0, (int) length - 2);
        else
            ps.write(record, 0, (int) length - 1);

        ps.println();
    }
941856
public void doAdd(Record record) throws DBException
    {
        m_LastModifiedBookmark = null;
        try   {
            BaseBuffer buffer = (BaseBuffer)m_dataSource;
            Object data = buffer.getPhysicalData();
            synchronized (this.getSyncObject())
            {   // In case this is called from another task
                m_LastModifiedBookmark = m_tableRemote.add(data, this.getRecord().getOpenMode());
            }
        } catch (Exception ex) {
            throw DatabaseException.toDatabaseException(ex);
        }
    }
629887
protected void writeLogRecord(LogRecord logRecord)
    {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "writeLogRecord", logRecord);

        _activeFile.writeLogRecord(logRecord);

        if (tc.isEntryEnabled())
            Tr.exit(tc, "writeLogRecord");
    }
811122
public static void write(final BedRecord record, final PrintWriter writer) {
        checkNotNull(record);
        checkNotNull(writer);
        writer.println(record.toString());
    }
328981
public String format(LogRecord record) {
		line.setLength(0);
		line.append('[');
		line.append(Instant.ofEpochMilli(record.getMillis()).toString());

		final Level l = record.getLevel();
		line.append("] ");
		if (l == Level.SEVERE) {
			line.append(SEVERE);
		} else if (l == Level.WARNING) {
			line.append(WARNING);
		} else if (l == Level.INFO) {
			line.append(INFO);
		} else if (l == Level.CONFIG) {
			line.append(CONFIG);
		} else if (l == Level.FINE) {
			line.append(FINE);
		} else if (l == Level.FINER) {
			line.append(FINER);
		} else {
			line.append(FINEST);
		}

		String className = record.getSourceClassName();
		int n;
		if (className == null) {
			className = "unknown";
		} else {
			n = className.lastIndexOf('$');
			if (n > -1) {
				className = className.substring(0, n);
			}
		}
		line.append(className);
		n = line.length();
		if (n > position || position - n > 30) {
			position = n;
		}
		n = 1 + position - n;
		if (n > 0) {
			for (int i = 0; i < n; i++) {
				line.append(' ');
			}
		}
		line.append(formatMessage(record));
		line.append(BREAK);

		// Dump error
		final Throwable cause = record.getThrown();
		if (cause != null) {
			StringBuilder errors = new StringBuilder(256);
			n = appendMessages(errors, cause);
			String trace = errors.toString().trim();
			if (!trace.isEmpty()) {
				for (int i = 0; i < n; i++) {
					line.append('-');
				}
				line.append(BREAK);
				line.append(trace);
				line.append(BREAK);
				for (int i = 0; i < n; i++) {
					line.append('-');
				}
				line.append(BREAK);
			}
			line.append("Trace: ");
			line.append(cause.toString());
			line.append(BREAK);
			StackTraceElement[] array = cause.getStackTrace();
			if (array != null && array.length > 0) {
				for (n = 0; n < array.length; n++) {
					line.append("-> [");
					line.append(n);
					line.append("] ");
					line.append(array[n]);
					line.append(BREAK);
				}
			}
		}
		return line.toString();
	}
883355
public void write(Object[] record) throws IOException, DbaseFileException {

		if (record.length != header.getNumFields()) {
			throw new DbaseFileException("Wrong number of fields "
					+ record.length + " expected " + header.getNumFields());
		}

		buffer.position(0);

		// put the 'not-deleted' marker
		buffer.put((byte) ' ');

		for (int i = 0; i < header.getNumFields(); i++) {
			String fieldString = fieldString(record[i], i);
			if (header.getFieldLength(i) != fieldString
					.getBytes(charset.name()).length) {
				buffer.put(new byte[header.getFieldLength(i)]);
			} else {
				buffer.put(fieldString.getBytes(charset.name()));
			}

		}

		write();
	}
848773
@Override
	public String format(LogRecord record) {
		/*String loggerName = record.getLoggerName();
		if (loggerName == null) {
			loggerName = "root";
		}*/
		// .append(loggerName)
		return "[" +
				StringUtils.repeat(" ", 8 - record.getLevel().toString().length()) +
				record.getLevel() + '|' +
				StringUtils.repeat(" ", 12 - Thread.currentThread().getName().length()) +
				Thread.currentThread().getName() + '|' +
				format.format(new Date(record.getMillis())) +
				"]: " +
				record.getMessage() + ' ' +
				lineSep;
	}
717768
public void fixRecord(Record record)
    {
        super.fixRecord(record);
        if (this.getProperty("field") != null)
        {
            BaseField field = this.getMainRecord().getField(this.getProperty("field").toString());
            if (field != null)
                this.fixCapitalization(field);
        }
    }
301443
public void add(CSVRecord record) {
        if (records == null)
            records = new ArrayList<>();
        records.add(record);
    }
1030775
public String format(LogRecord record) {
        StringBuffer sb = new StringBuffer();
        String message = formatMessage(record);
        sb.append(message);
        sb.append(lineSeparator);
        if (record.getThrown() != null) {
            try {
                StringWriter sw = new StringWriter();
                PrintWriter pw = new PrintWriter(sw);
                record.getThrown().printStackTrace(pw);
                pw.close();
            sb.append(sw.toString());
            } catch (Exception ex) {
            	if (record.getThrown().getCause() != null){
					sb.append(record.getThrown().getCause().getLocalizedMessage());
            	}else{
					sb.append(record.getThrown().getLocalizedMessage());
            	}
            	
            }
        }
        return sb.toString();
    }
738623
public void setRecord(Rec record)
    {
        if (m_tableNext != null)
            m_tableNext.setRecord(record);  // Must be synchronized
        super.setRecord(record);
    }
67589
@Override
  public synchronized void publish(LogRecord record)
  {
    if (!super.isLoggable(record) || this.getLevel() != null &&
                                     record.getLevel().intValue() < this.getLevel().intValue())
    {
      return;
    }

    synchronized (logBuffer)
    {
      if (logBuffer.size() == LOG_BUFFER_SIZE)
      {
        logBuffer.remove(0);
      }

      logBuffer.add(record);
    }
  }
1284847
private void publishTextRecord(final LogRecord record) {
    try {
      logpane.publish(record);
    }
    catch(Exception e) {
      throw new RuntimeException("Error writing a log-like message.", e);
    }
  }
820122
@Override
    public void write(DataOutput out) throws IOException {
        if (record != null) record.write(out);
    }
124134
protected function write( array $record )
    {
        if ($this->_debugbar->hasCollector('log') && $this->_debugbar->shouldCollect('log') ) {
            $type = array_keys( $this->_levelMap,$record['level_name']);
            $this->_debugbar->getCollector('log')
                ->add( $record['message'], end($type), microtime(true), $record['context']);
        }
    }
923207
public void updateRecord(final ORecordInternal<?> record) {
    if (isEnabled() && record.getIdentity().getClusterId() != excludedCluster && record.getIdentity().isValid()) {
      underlying.lock(record.getIdentity());
      try {
        if (underlying.get(record.getIdentity()) != record)
          underlying.put(record);
      } finally {
        underlying.unlock(record.getIdentity());
      }
    }

    secondary.updateRecord(record);
  }
964667
public void add(SingleCSVRecord record) {
        if (records == null)
            records = new ArrayList<>();
        records.add(record);
    }