code: protected byte[] getLogMessage(final ObjectNode event) {
          try(ByteArrayBuilder buf = new ByteArrayBuilder()){
              mapper.writeValue(buf, event);
              buf.append('\n');
              return buf.toByteArray();
          } catch (IOException e) {
              addError("while serializing log event", e);
              return NADA;
          }
      }
docs: Convert the JSON object to a byte array to log
  @param event the event to log
  @return the byte array to append to the log