logback-android/src/main/java/ch/qos/logback/core/OutputStreamAppender.java
protected void subAppend(E event) {
    if (!isStarted()) {
      return;
    }
    try {
      // this step avoids LBCLASSIC-139
      if (event instanceof DeferredProcessingAware) {
        ((DeferredProcessingAware) event).prepareForDeferredProcessing();
      }
      // the synchronization prevents the OutputStream from being closed while we
      // are writing. It also prevents multiple threads from entering the same
      // converter. Converters assume that they are in a synchronized block.
      //lock.lock();
      byte[] byteArray = this.encoder.encode(event);
      writeBytes(byteArray);

    } catch (IOException ioe) {
      // as soon as an exception occurs, move to non-started state
      // and add a single ErrorStatus to the SM.
      this.started = false;
      addStatus(new ErrorStatus("IO failure in appender", this, ioe));
    }
  }
protected void subAppend(E event) {
    if (!isStarted()) {
      return;
    }
    try {
      // this step avoids LBCLASSIC-139
      if (event instanceof DeferredProcessingAware) {
        ((DeferredProcessingAware) event).prepareForDeferredProcessing();
      }
      // the synchronization prevents the OutputStream from being closed while we
      // are writing. It also prevents multiple threads from entering the same
      // converter. Converters assume that they are in a synchronized block.
      //lock.lock();
      byte[] byteArray = this.encoder.encode(event);
      writeBytes(byteArray);

    } catch (IOException ioe) {
      // as soon as an exception occurs, move to non-started state
      // and add a single ErrorStatus to the SM.
      this.started = false;
      addStatus(new ErrorStatus("IO failure in appender", this, ioe));
    }
  }
protected void subAppend ( E event ) { if ( ! isStarted ( ) ) { return ; } try { // this step avoids LBCLASSIC-139 if ( event instanceof DeferredProcessingAware ) { ( ( DeferredProcessingAware ) event ) . prepareForDeferredProcessing ( ) ; } // the synchronization prevents the OutputStream from being closed while we // are writing. It also prevents multiple threads from entering the same // converter. Converters assume that they are in a synchronized block. //lock.lock(); byte [ ] byteArray = this . encoder . encode ( event ) ; writeBytes ( byteArray ) ; } catch ( IOException ioe ) { // as soon as an exception occurs, move to non-started state // and add a single ErrorStatus to the SM. this . started = false ; addStatus ( new ErrorStatus ( "IO failure in appender" , this , ioe ) ) ; } }
Actual writing occurs here.
<p>
Most subclasses of <code>WriterAppender</code> will need to override this
method.

@param event the log event
@since 0.9.0
Actual writing occurs here . <p > Most subclasses of <code > WriterAppender< / code > will need to override this method .