logback-android/src/main/java/ch/qos/logback/classic/android/LogcatAppender.java
@Override
  public void start() {
    if ((this.encoder == null) || (this.encoder.getLayout() == null)) {
      addError("No layout set for the appender named [" + name + "].");
      return;
    }

    // tag encoder is optional but needs a layout
    if (this.tagEncoder != null) {
      final Layout<?> layout = this.tagEncoder.getLayout();

      if (layout == null) {
        addError("No tag layout set for the appender named [" + name + "].");
        return;
      }

      // prevent stack traces from showing up in the tag
      // (which could lead to very confusing error messages)
      if (layout instanceof PatternLayout) {
        String pattern = this.tagEncoder.getPattern();
        if (!pattern.contains("%nopex")) {
          this.tagEncoder.stop();
          this.tagEncoder.setPattern(pattern + "%nopex");
          this.tagEncoder.start();
        }

        PatternLayout tagLayout = (PatternLayout) layout;
        tagLayout.setPostCompileProcessor(null);
      }
    }

    super.start();
  }
@Override
  public void start() {
    if ((this.encoder == null) || (this.encoder.getLayout() == null)) {
      addError("No layout set for the appender named [" + name + "].");
      return;
    }

    // tag encoder is optional but needs a layout
    if (this.tagEncoder != null) {
      final Layout<?> layout = this.tagEncoder.getLayout();

      if (layout == null) {
        addError("No tag layout set for the appender named [" + name + "].");
        return;
      }

      // prevent stack traces from showing up in the tag
      // (which could lead to very confusing error messages)
      if (layout instanceof PatternLayout) {
        String pattern = this.tagEncoder.getPattern();
        if (!pattern.contains("%nopex")) {
          this.tagEncoder.stop();
          this.tagEncoder.setPattern(pattern + "%nopex");
          this.tagEncoder.start();
        }

        PatternLayout tagLayout = (PatternLayout) layout;
        tagLayout.setPostCompileProcessor(null);
      }
    }

    super.start();
  }
@ Override public void start ( ) { if ( ( this . encoder == null ) || ( this . encoder . getLayout ( ) == null ) ) { addError ( "No layout set for the appender named [" + name + "]." ) ; return ; } // tag encoder is optional but needs a layout if ( this . tagEncoder != null ) { final Layout < ? > layout = this . tagEncoder . getLayout ( ) ; if ( layout == null ) { addError ( "No tag layout set for the appender named [" + name + "]." ) ; return ; } // prevent stack traces from showing up in the tag // (which could lead to very confusing error messages) if ( layout instanceof PatternLayout ) { String pattern = this . tagEncoder . getPattern ( ) ; if ( ! pattern . contains ( "%nopex" ) ) { this . tagEncoder . stop ( ) ; this . tagEncoder . setPattern ( pattern + "%nopex" ) ; this . tagEncoder . start ( ) ; } PatternLayout tagLayout = ( PatternLayout ) layout ; tagLayout . setPostCompileProcessor ( null ) ; } } super . start ( ) ; }
Checks that required parameters are set, and if everything is in order,
activates this appender.
Checks that required parameters are set and if everything is in order activates this appender .