protected boolean openFile(String filename) throws IOException {
    """
	<p>
	Sets and <i>opens</i> the file where the log output will go. The specified
	file must be writable.
	
	<p>
	If there was already an opened file, then the previous file is closed
	first.
	
	<p>
	<b>Do not use this method directly. To configure a FileAppender or one of
	its subclasses, set its properties one by one and then call start().</b>
	
	@param filename
	The path to the log file.
	
	@return true if successful; false otherwise
	@throws IOException file could not be opened
    """
    boolean successful = false;
    filename = getAbsoluteFilePath(filename);
    lock.lock();
    try {
      File file = new File(filename);
      boolean result = FileUtil.createMissingParentDirectories(file);
      if (!result) {
        addError("Failed to create parent directories for ["
                + file.getAbsolutePath() + "]");
      }

      ResilientFileOutputStream resilientFos = new ResilientFileOutputStream(file, append, bufferSize.getSize());
      resilientFos.setContext(context);
      setOutputStream(resilientFos);
      successful = true;
    } finally {
      lock.unlock();
    }
    return successful;
  }
protected boolean openFile(String filename) throws IOException {
    boolean successful = false;
    filename = getAbsoluteFilePath(filename);
    lock.lock();
    try {
      File file = new File(filename);
      boolean result = FileUtil.createMissingParentDirectories(file);
      if (!result) {
        addError("Failed to create parent directories for ["
                + file.getAbsolutePath() + "]");
      }

      ResilientFileOutputStream resilientFos = new ResilientFileOutputStream(file, append, bufferSize.getSize());
      resilientFos.setContext(context);
      setOutputStream(resilientFos);
      successful = true;
    } finally {
      lock.unlock();
    }
    return successful;
  }
protected boolean openFile ( String filename ) throws IOException { boolean successful = false ; filename = getAbsoluteFilePath ( filename ) ; lock . lock ( ) ; try { File file = new File ( filename ) ; boolean result = FileUtil . createMissingParentDirectories ( file ) ; if ( ! result ) { addError ( "Failed to create parent directories for [" + file . getAbsolutePath ( ) + "]" ) ; } ResilientFileOutputStream resilientFos = new ResilientFileOutputStream ( file , append , bufferSize . getSize ( ) ) ; resilientFos . setContext ( context ) ; setOutputStream ( resilientFos ) ; successful = true ; } finally { lock . unlock ( ) ; } return successful ; }
<p>
Sets and <i>opens</i> the file where the log output will go. The specified
file must be writable.

<p>
If there was already an opened file, then the previous file is closed
first.

<p>
<b>Do not use this method directly. To configure a FileAppender or one of
its subclasses, set its properties one by one and then call start().</b>

@param filename
The path to the log file.

@return true if successful; false otherwise
@throws IOException file could not be opened
<p > Sets and <i > opens< / i > the file where the log output will go . The specified file must be writable .