code: public void addLog(final byte iOperation, final int iTxId, final int iClusterId, final long iClusterOffset,
        final byte iRecordType, final int iRecordVersion, final byte[] iRecordContent, int dataSegmentId) throws IOException {
  
      final int contentSize = iRecordContent != null ? iRecordContent.length : 0;
      final int size = OFFSET_RECORD_CONTENT + contentSize;
  
      lock.acquireExclusiveLock();
      try {
  
        int offset = file.allocateSpace(size);
  
        file.writeByte(offset, STATUS_COMMITTING);
        offset += OBinaryProtocol.SIZE_BYTE;
  
        file.writeByte(offset, iOperation);
        offset += OBinaryProtocol.SIZE_BYTE;
  
        file.writeInt(offset, iTxId);
        offset += OBinaryProtocol.SIZE_INT;
  
        file.writeShort(offset, (short) iClusterId);
        offset += OBinaryProtocol.SIZE_SHORT;
  
        file.writeLong(offset, iClusterOffset);
        offset += OBinaryProtocol.SIZE_LONG;
  
        file.writeByte(offset, iRecordType);
        offset += OBinaryProtocol.SIZE_BYTE;
  
        file.writeInt(offset, iRecordVersion);
        offset += OBinaryProtocol.SIZE_INT;
  
        file.writeInt(offset, dataSegmentId);
        offset += OBinaryProtocol.SIZE_INT;
  
        file.writeInt(offset, contentSize);
        offset += OBinaryProtocol.SIZE_INT;
  
        file.write(offset, iRecordContent);
        offset += contentSize;
  
        if (synchEnabled)
          file.synch();
  
      } finally {
        lock.releaseExclusiveLock();
      }
    }
docs: Appends a log entry