jetbrains.buildServer.util
Class TCRollingFileAppender

java.lang.Object
  extended by org.apache.log4j.AppenderSkeleton
      extended by org.apache.log4j.WriterAppender
          extended by org.apache.log4j.FileAppender
              extended by org.apache.log4j.RollingFileAppender
                  extended by jetbrains.buildServer.util.TCRollingFileAppender
All Implemented Interfaces:
org.apache.log4j.Appender, org.apache.log4j.spi.OptionHandler

public class TCRollingFileAppender
extends org.apache.log4j.RollingFileAppender

Differs from RollingFileAppender in that it creates file when append action is called, not when file is set


Field Summary
 
Fields inherited from class org.apache.log4j.RollingFileAppender
maxBackupIndex, maxFileSize
 
Fields inherited from class org.apache.log4j.FileAppender
bufferedIO, bufferSize, fileAppend, fileName
 
Fields inherited from class org.apache.log4j.WriterAppender
encoding, immediateFlush, qw
 
Fields inherited from class org.apache.log4j.AppenderSkeleton
closed, errorHandler, headFilter, layout, name, tailFilter, threshold
 
Constructor Summary
TCRollingFileAppender()
           
TCRollingFileAppender(org.apache.log4j.Layout layout, java.lang.String filename)
           
TCRollingFileAppender(org.apache.log4j.Layout layout, java.lang.String filename, boolean append)
           
 
Method Summary
 void append(org.apache.log4j.spi.LoggingEvent event)
          This method is called by the AppenderSkeleton.doAppend(org.apache.log4j.spi.LoggingEvent) method.
 void setFile(java.lang.String fileName, boolean append, boolean bufferedIO, int bufferSize)
          Sets and opens the file where the log output will go.
 
Methods inherited from class org.apache.log4j.RollingFileAppender
getMaxBackupIndex, getMaximumFileSize, rollOver, setMaxBackupIndex, setMaxFileSize, setMaximumFileSize, setQWForFiles, subAppend
 
Methods inherited from class org.apache.log4j.FileAppender
activateOptions, closeFile, getAppend, getBufferedIO, getBufferSize, getFile, reset, setAppend, setBufferedIO, setBufferSize, setFile
 
Methods inherited from class org.apache.log4j.WriterAppender
checkEntryConditions, close, closeWriter, createWriter, getEncoding, getImmediateFlush, requiresLayout, setEncoding, setErrorHandler, setImmediateFlush, setWriter, writeFooter, writeHeader
 
Methods inherited from class org.apache.log4j.AppenderSkeleton
addFilter, clearFilters, doAppend, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setLayout, setName, setThreshold
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TCRollingFileAppender

public TCRollingFileAppender()

TCRollingFileAppender

public TCRollingFileAppender(org.apache.log4j.Layout layout,
                             java.lang.String filename)
                      throws java.io.IOException
Throws:
java.io.IOException

TCRollingFileAppender

public TCRollingFileAppender(org.apache.log4j.Layout layout,
                             java.lang.String filename,
                             boolean append)
                      throws java.io.IOException
Throws:
java.io.IOException
Method Detail

append

public void append(org.apache.log4j.spi.LoggingEvent event)
Description copied from class: org.apache.log4j.WriterAppender
This method is called by the AppenderSkeleton.doAppend(org.apache.log4j.spi.LoggingEvent) method.

If the output stream exists and is writable then write a log statement to the output stream. Otherwise, write a single warning message to System.err.

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

Overrides:
append in class org.apache.log4j.WriterAppender

setFile

public void setFile(java.lang.String fileName,
                    boolean append,
                    boolean bufferedIO,
                    int bufferSize)
             throws java.io.IOException
Description copied from class: org.apache.log4j.FileAppender

Sets and opens the file where the log output will go. The specified file must be writable.

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

Do not use this method directly. To configure a FileAppender or one of its subclasses, set its properties one by one and then call activateOptions.

Overrides:
setFile in class org.apache.log4j.RollingFileAppender
Parameters:
fileName - The path to the log file.
append - If true will append to fileName. Otherwise will truncate fileName.
Throws:
java.io.IOException