public void logString(final DriverEventCode code, final String value)
    {
        final int length = value.length() + SIZE_OF_INT;
        final int captureLength = captureLength(length);
        final int encodedLength = encodedLength(captureLength);

        final ManyToOneRingBuffer ringBuffer = this.ringBuffer;
        final int index = ringBuffer.tryClaim(toEventCodeId(code), encodedLength);
        if (index > 0)
        {
            try
            {
                encode((UnsafeBuffer)ringBuffer.buffer(), index, captureLength, length, value);
            }
            finally
            {
                ringBuffer.commit(index);
            }
        }
    }
@Test
    void logString()
    {
        final int recordOffset = align(100, ALIGNMENT);
        logBuffer.putLong(CAPACITY + TAIL_POSITION_OFFSET, recordOffset);
        final DriverEventCode eventCode = CMD_IN_ADD_PUBLICATION;
        final String value = "abc";
        final int captureLength = value.length() + SIZE_OF_INT;

        logger.logString(eventCode, value);

        verifyLogHeader(logBuffer, recordOffset, toEventCodeId(eventCode), captureLength, captureLength);
        assertEquals(value,
            logBuffer.getStringAscii(encodedMsgOffset(recordOffset + LOG_HEADER_LENGTH), LITTLE_ENDIAN));
    }