org.apache.logging.log4j.core.appender
Class FileAppender

java.lang.Object
  extended by org.apache.logging.log4j.core.filter.Filterable
      extended by org.apache.logging.log4j.core.appender.AppenderBase
          extended by org.apache.logging.log4j.core.appender.OutputStreamAppender
              extended by org.apache.logging.log4j.core.appender.FileAppender
All Implemented Interfaces:
Appender, Filtering, Lifecycle

public final class FileAppender
extends OutputStreamAppender

File Appender.


Field Summary
 
Fields inherited from class org.apache.logging.log4j.core.appender.OutputStreamAppender
immediateFlush
 
Fields inherited from class org.apache.logging.log4j.core.appender.AppenderBase
LOGGER
 
Method Summary
static FileAppender createAppender(String fileName, String append, String locking, String name, String immediateFlush, String suppress, String bufferedIO, Layout layout, Filter filter)
          Create a File Appender.
 String getFileName()
          Return the file name this appender is associated with.
 
Methods inherited from class org.apache.logging.log4j.core.appender.OutputStreamAppender
append, getManager, replaceManager, start, stop
 
Methods inherited from class org.apache.logging.log4j.core.appender.AppenderBase
close, error, error, error, getHandler, getLayout, getName, isExceptionSuppressed, isStarted, setHandler, toString
 
Methods inherited from class org.apache.logging.log4j.core.filter.Filterable
addFilter, getFilter, hasFilter, isFiltered, removeFilter, startFilter, stopFilter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getFileName

public String getFileName()
Return the file name this appender is associated with.

Returns:
The File name.

createAppender

public static FileAppender createAppender(String fileName,
                                          String append,
                                          String locking,
                                          String name,
                                          String immediateFlush,
                                          String suppress,
                                          String bufferedIO,
                                          Layout layout,
                                          Filter filter)
Create a File Appender.

Parameters:
fileName - The name and path of the file.
append - "True" if the file should be appended to, "false" if it should be overwritten. The default is "true".
locking - "True" if the file should be locked. The default is "false".
name - The name of the Appender.
immediateFlush - "true" if the contents should be flushed on every write, "false" otherwise. The default is "true".
suppress - "true" if exceptions should be hidden from the application, "false" otherwise. The default is "true".
bufferedIO - "true" if I/O should be buffered, "false" otherwise. The default is "true".
layout - The layout to use to format the event. If no layout is provided the default PatternLayout will be used.
filter - The filter, if any, to use.
Returns:
The FileAppender.


Copyright © 1999-2012 Apache Software Foundation. All Rights Reserved.