private void writeHeader(LoggingEvent event) { writePRI(event.getLevel()); writeVersion(); writeSP(); writeTimeStamp(event.timeStamp); writeSP(); writeString(hostName); writeSP(); writeString(applicationName); writeSP(); writeString(processID); writeSP(); writeString(messageID); }
@Override protected void append(LoggingEvent event) { try { buf.reset(); writeHeader(event); writeSP(); writeStructuredData(); writeSP(); if (prefixMessageWithBOM) writeBOM(); writeString(event.getRenderedMessage()); protocol.send(this); } catch (IOException e) { errorHandler.error( "Failed to emit message by " + protocol + " connection to " + host + ":" + port, e, ErrorCode.WRITE_FAILURE, event); } }