com.taobao.metamorphosis.client.extension.log4j
类 DailyRollingFileStreamAppender

java.lang.Object
  继承者 org.apache.log4j.AppenderSkeleton
      继承者 com.taobao.metamorphosis.client.extension.log4j.StreamAppender
          继承者 com.taobao.metamorphosis.client.extension.log4j.FileStreamAppender
              继承者 com.taobao.metamorphosis.client.extension.log4j.DailyRollingFileStreamAppender
所有已实现的接口:
org.apache.log4j.Appender, org.apache.log4j.spi.OptionHandler

public class DailyRollingFileStreamAppender
extends FileStreamAppender

从以下版本开始:
1.0, 2009-10-20 下午03:49:58
作者:
wuxin

字段摘要
 
从类 com.taobao.metamorphosis.client.extension.log4j.FileStreamAppender 继承的字段
bufferedIO, bufferSize, fileAppend, fileName
 
从类 com.taobao.metamorphosis.client.extension.log4j.StreamAppender 继承的字段
connectionPool, encodeType, immediateFlush, messageSessionFactory, out, producer, topic, zkConfig
 
从类 org.apache.log4j.AppenderSkeleton 继承的字段
closed, errorHandler, headFilter, layout, name, tailFilter, threshold
 
构造方法摘要
DailyRollingFileStreamAppender()
          The default constructor does nothing.
DailyRollingFileStreamAppender(org.apache.log4j.Layout layout, String filename, String datePattern)
          Instantiate a DailyRollingFileAppender and open the file designated by filename.
 
方法摘要
 void activateOptions()
          If the value of File is not null, then FileStreamAppender.setFile(java.lang.String) is called with the values of File and Append properties.
 String getDatePattern()
          Returns the value of the DatePattern option.
 void setDatePattern(String pattern)
          The DatePattern takes a string in the same format as expected by SimpleDateFormat.
protected  void subAppend(org.apache.log4j.spi.LoggingEvent event)
          This method differentiates DailyRollingFileAppender from its super class.
 
从类 com.taobao.metamorphosis.client.extension.log4j.FileStreamAppender 继承的方法
closeFile, getAppend, getBufferedIO, getBufferSize, getFile, reset, setAppend, setBufferedIO, setBufferSize, setFile, setFile
 
从类 com.taobao.metamorphosis.client.extension.log4j.StreamAppender 继承的方法
append, checkEntryConditions, close, closeWriter, getEncodeType, getImmediateFlush, getTopic, requiresLayout, setEncodeType, setImmediateFlush, setName, setTopic, setZkConnect, writeFooter, writeHeader
 
从类 org.apache.log4j.AppenderSkeleton 继承的方法
addFilter, clearFilters, doAppend, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setErrorHandler, setLayout, setThreshold
 
从类 java.lang.Object 继承的方法
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

DailyRollingFileStreamAppender

public DailyRollingFileStreamAppender()
The default constructor does nothing.


DailyRollingFileStreamAppender

public DailyRollingFileStreamAppender(org.apache.log4j.Layout layout,
                                      String filename,
                                      String datePattern)
                               throws IOException
Instantiate a DailyRollingFileAppender and open the file designated by filename. The opened filename will become the ouput destination for this appender.

抛出:
IOException
方法详细信息

setDatePattern

public void setDatePattern(String pattern)
The DatePattern takes a string in the same format as expected by SimpleDateFormat. This options determines the rollover schedule.


getDatePattern

public String getDatePattern()
Returns the value of the DatePattern option.


activateOptions

public void activateOptions()
从类 FileStreamAppender 复制的描述
If the value of File is not null, then FileStreamAppender.setFile(java.lang.String) is called with the values of File and Append properties.

指定者:
接口 org.apache.log4j.spi.OptionHandler 中的 activateOptions
覆盖:
FileStreamAppender 中的 activateOptions

subAppend

protected void subAppend(org.apache.log4j.spi.LoggingEvent event)
This method differentiates DailyRollingFileAppender from its super class.

Before actually logging, this method will check whether it is time to do a rollover. If it is, it will schedule the next rollover time and then rollover.

覆盖:
StreamAppender 中的 subAppend


Copyright © 2010–2013. All rights reserved.