Save This Page
Home » apache-log4j-1.2.15 » org.apache » log4j » [javadoc | source]
org.apache.log4j
public class: TempFileAppender [javadoc | source]
java.lang.Object
   org.apache.log4j.AppenderSkeleton
      org.apache.log4j.TempFileAppender

All Implemented Interfaces:
    OptionHandler, Appender

TempFileAppender creates new unique file for each logging statement.
Field Summary
public static final  String PATH_OPTION    A string constant used in naming the option for setting the directory where the log files will be created. Current value of this string constant is Path. java.io.tmpdir directory will be used, if ommited. 
protected  String path    The default path is actual directory. 
public static final  String PREFIX_OPTION    A string constant used in naming the option for setting the prefix of the log files. It has to have at least 3 characters! Current value of this string constant is Prefix
protected  String prefix    The default path is actual directory. 
public static final  String SUFFIX_OPTION    A string constant used in naming the option for setting the suffix of the log files. Current value of this string constant is Suffix
protected  String suffix    The default path is actual directory. 
protected  File dir    Default dir 
Fields inherited from org.apache.log4j.AppenderSkeleton:
layout,  name,  threshold,  errorHandler,  headFilter,  tailFilter,  closed
Constructor:
 public TempFileAppender() 
Method from org.apache.log4j.TempFileAppender Summary:
append,   checkEntryConditions,   close,   getOptionStrings,   requiresLayout,   setOption,   subAppend
Methods from org.apache.log4j.AppenderSkeleton:
activateOptions,   addFilter,   append,   clearFilters,   doAppend,   finalize,   getErrorHandler,   getFilter,   getFirstFilter,   getLayout,   getName,   getThreshold,   isAsSevereAsThreshold,   setErrorHandler,   setLayout,   setName,   setThreshold
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.log4j.TempFileAppender Detail:
 public  void append(LoggingEvent event) 
    This method is called by AppenderSkeleton#doAppend method.

    Whenever this method is called, new unique file is created with specified prefix and suffix. The file is closed afterwards.

    The format of the output will depend on this appender's layout.

 protected boolean checkEntryConditions() 
    This method determines if there is a sense in attempting to append.
 public  void close() 
 public String[] getOptionStrings() 
    Retuns the option names for this component
 public boolean requiresLayout() 
 public  void setOption(String key,
    String value) 
 protected  void subAppend(LoggingEvent event) 
    This method does actual writing