protected void subAppend(final LoggingEvent event) {
        try {
            Object message = null;
            message = event.getMessage();
            if (message == null) {
                return;
            }

            this.logObject(CodecBuilder.buildSerializer(this.encodeType).encodeObject(message));

            this.out.flush();
            /*
             * if (this.immediateFlush) { this.writer.flush(); }
             */
        }
        catch (final Exception e) {
            LogLog.error("Can not write data," + this.out, e);
        }
    }
Actual writing occurs here.

<p>
Most subclasses of <code>WriterAppender</code> will need to override this
method.

@since 0.9.0
metamorphosis-client-extension/src/main/java/com/taobao/metamorphosis/client/extension/log4j/StreamAppender.java