logback-android/src/main/java/ch/qos/logback/core/FileAppender.java
public void start() {
    int errors = 0;

    // Use getFile() instead of direct access to fileName because
    // the function is overridden in RollingFileAppender, which
    // returns a value that doesn't necessarily match fileName.
    String file = getFile();

    if (file != null) {
      file = getAbsoluteFilePath(file);
      addInfo("File property is set to [" + file + "]");

      if (prudent) {
        if (!isAppend()) {
          setAppend(true);
          addWarn("Setting \"Append\" property to true on account of \"Prudent\" mode");
        }
      }

      if (!lazyInit) {
        if (checkForFileCollisionInPreviousFileAppenders()) {
          addError("Collisions detected with FileAppender/RollingAppender instances defined earlier. Aborting.");
          addError(COLLISION_WITH_EARLIER_APPENDER_URL);
          errors++;
        } else {
          // file should be opened only if collision free
          try {
            openFile(file);
          } catch (IOException e) {
            errors++;
            addError("openFile(" + file + "," + append + ") failed", e);
          }
        }
      } else {
        // We'll initialize the file output stream later. Use a dummy for now
        // to satisfy OutputStreamAppender.start().
        setOutputStream(new NOPOutputStream());
      }
    } else {
      errors++;
      addError("\"File\" property not set for appender named [" + name + "]");
    }
    if (errors == 0) {
      super.start();
    }
  }
public void start() {
    int errors = 0;

    // Use getFile() instead of direct access to fileName because
    // the function is overridden in RollingFileAppender, which
    // returns a value that doesn't necessarily match fileName.
    String file = getFile();

    if (file != null) {
      file = getAbsoluteFilePath(file);
      addInfo("File property is set to [" + file + "]");

      if (prudent) {
        if (!isAppend()) {
          setAppend(true);
          addWarn("Setting \"Append\" property to true on account of \"Prudent\" mode");
        }
      }

      if (!lazyInit) {
        if (checkForFileCollisionInPreviousFileAppenders()) {
          addError("Collisions detected with FileAppender/RollingAppender instances defined earlier. Aborting.");
          addError(COLLISION_WITH_EARLIER_APPENDER_URL);
          errors++;
        } else {
          // file should be opened only if collision free
          try {
            openFile(file);
          } catch (IOException e) {
            errors++;
            addError("openFile(" + file + "," + append + ") failed", e);
          }
        }
      } else {
        // We'll initialize the file output stream later. Use a dummy for now
        // to satisfy OutputStreamAppender.start().
        setOutputStream(new NOPOutputStream());
      }
    } else {
      errors++;
      addError("\"File\" property not set for appender named [" + name + "]");
    }
    if (errors == 0) {
      super.start();
    }
  }
public void start ( ) { int errors = 0 ; // Use getFile() instead of direct access to fileName because // the function is overridden in RollingFileAppender, which // returns a value that doesn't necessarily match fileName. String file = getFile ( ) ; if ( file != null ) { file = getAbsoluteFilePath ( file ) ; addInfo ( "File property is set to [" + file + "]" ) ; if ( prudent ) { if ( ! isAppend ( ) ) { setAppend ( true ) ; addWarn ( "Setting \"Append\" property to true on account of \"Prudent\" mode" ) ; } } if ( ! lazyInit ) { if ( checkForFileCollisionInPreviousFileAppenders ( ) ) { addError ( "Collisions detected with FileAppender/RollingAppender instances defined earlier. Aborting." ) ; addError ( COLLISION_WITH_EARLIER_APPENDER_URL ) ; errors ++ ; } else { // file should be opened only if collision free try { openFile ( file ) ; } catch ( IOException e ) { errors ++ ; addError ( "openFile(" + file + "," + append + ") failed" , e ) ; } } } else { // We'll initialize the file output stream later. Use a dummy for now // to satisfy OutputStreamAppender.start(). setOutputStream ( new NOPOutputStream ( ) ) ; } } else { errors ++ ; addError ( "\"File\" property not set for appender named [" + name + "]" ) ; } if ( errors == 0 ) { super . start ( ) ; } }
If the value of <b>File</b> is not <code>null</code>, then
{@link #openFile} is called with the values of <b>File</b> and
<b>Append</b> properties.
If the value of <b > File< / b > is not <code > null< / code > then {