亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? rollingfileappender.java

?? log4j的源碼
?? JAVA
字號:
/* * Copyright 1999-2005 The Apache Software Foundation. *  * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at *  *      http://www.apache.org/licenses/LICENSE-2.0 *  * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */package org.apache.log4j;import java.io.IOException;import java.io.Writer;import java.io.File;import org.apache.log4j.helpers.OptionConverter;import org.apache.log4j.helpers.LogLog;import org.apache.log4j.helpers.CountingQuietWriter;import org.apache.log4j.spi.LoggingEvent;/**   RollingFileAppender extends FileAppender to backup the log files when   they reach a certain size.   @author Heinz Richter   @author Ceki G&uuml;lc&uuml;*/public class RollingFileAppender extends FileAppender {  /**     The default maximum file size is 10MB.  */  protected long maxFileSize = 10*1024*1024;  /**     There is one backup file by default.   */  protected int  maxBackupIndex  = 1;  /**     The default constructor simply calls its {@link     FileAppender#FileAppender parents constructor}.  */  public  RollingFileAppender() {    super();  }  /**    Instantiate a RollingFileAppender and open the file designated by    <code>filename</code>. The opened filename will become the ouput    destination for this appender.    <p>If the <code>append</code> parameter is true, the file will be    appended to. Otherwise, the file desginated by    <code>filename</code> will be truncated before being opened.  */  public  RollingFileAppender(Layout layout, String filename, boolean append)                                      throws IOException {    super(layout, filename, append);  }  /**     Instantiate a FileAppender and open the file designated by    <code>filename</code>. The opened filename will become the output    destination for this appender.    <p>The file will be appended to.  */  public  RollingFileAppender(Layout layout, String filename) throws IOException {    super(layout, filename);  }  /**     Returns the value of the <b>MaxBackupIndex</b> option.   */  public  int getMaxBackupIndex() {    return maxBackupIndex;  } /**    Get the maximum size that the output file is allowed to reach    before being rolled over to backup files.    @since 1.1 */  public  long getMaximumFileSize() {    return maxFileSize;  }  /**     Implements the usual roll over behaviour.     <p>If <code>MaxBackupIndex</code> is positive, then files     {<code>File.1</code>, ..., <code>File.MaxBackupIndex -1</code>}     are renamed to {<code>File.2</code>, ...,     <code>File.MaxBackupIndex</code>}. Moreover, <code>File</code> is     renamed <code>File.1</code> and closed. A new <code>File</code> is     created to receive further log output.     <p>If <code>MaxBackupIndex</code> is equal to zero, then the     <code>File</code> is truncated with no backup files created.   */  public // synchronization not necessary since doAppend is alreasy synched  void rollOver() {    File target;    File file;    if (qw != null) {    	LogLog.debug("rolling over count=" + ((CountingQuietWriter) qw).getCount());    }    LogLog.debug("maxBackupIndex="+maxBackupIndex);    // If maxBackups <= 0, then there is no file renaming to be done.    if(maxBackupIndex > 0) {      // Delete the oldest file, to keep Windows happy.      file = new File(fileName + '.' + maxBackupIndex);      if (file.exists())       file.delete();      // Map {(maxBackupIndex - 1), ..., 2, 1} to {maxBackupIndex, ..., 3, 2}      for (int i = maxBackupIndex - 1; i >= 1; i--) {	file = new File(fileName + "." + i);	if (file.exists()) {	  target = new File(fileName + '.' + (i + 1));	  LogLog.debug("Renaming file " + file + " to " + target);	  file.renameTo(target);	}      }      // Rename fileName to fileName.1      target = new File(fileName + "." + 1);      this.closeFile(); // keep windows happy.      file = new File(fileName);      LogLog.debug("Renaming file " + file + " to " + target);      file.renameTo(target);    }    try {      // This will also close the file. This is OK since multiple      // close operations are safe.      this.setFile(fileName, false, bufferedIO, bufferSize);    }    catch(IOException e) {      LogLog.error("setFile("+fileName+", false) call failed.", e);    }  }  public  synchronized  void setFile(String fileName, boolean append, boolean bufferedIO, int bufferSize)                                                                 throws IOException {    super.setFile(fileName, append, this.bufferedIO, this.bufferSize);    if(append) {      File f = new File(fileName);      ((CountingQuietWriter) qw).setCount(f.length());    }  }  /**     Set the maximum number of backup files to keep around.     <p>The <b>MaxBackupIndex</b> option determines how many backup     files are kept before the oldest is erased. This option takes     a positive integer value. If set to zero, then there will be no     backup files and the log file will be truncated when it reaches     <code>MaxFileSize</code>.   */  public  void setMaxBackupIndex(int maxBackups) {    this.maxBackupIndex = maxBackups;  }  /**     Set the maximum size that the output file is allowed to reach     before being rolled over to backup files.     <p>This method is equivalent to {@link #setMaxFileSize} except     that it is required for differentiating the setter taking a     <code>long</code> argument from the setter taking a     <code>String</code> argument by the JavaBeans {@link     java.beans.Introspector Introspector}.     @see #setMaxFileSize(String) */  public  void setMaximumFileSize(long maxFileSize) {    this.maxFileSize = maxFileSize;  }  /**     Set the maximum size that the output file is allowed to reach     before being rolled over to backup files.     <p>In configuration files, the <b>MaxFileSize</b> option takes an     long integer in the range 0 - 2^63. You can specify the value     with the suffixes "KB", "MB" or "GB" so that the integer is     interpreted being expressed respectively in kilobytes, megabytes     or gigabytes. For example, the value "10KB" will be interpreted     as 10240.   */  public  void setMaxFileSize(String value) {    maxFileSize = OptionConverter.toFileSize(value, maxFileSize + 1);  }  protected  void setQWForFiles(Writer writer) {     this.qw = new CountingQuietWriter(writer, errorHandler);  }  /**     This method differentiates RollingFileAppender from its super     class.     @since 0.9.0  */  protected  void subAppend(LoggingEvent event) {    super.subAppend(event);    if((fileName != null) &&                     ((CountingQuietWriter) qw).getCount() >= maxFileSize)      this.rollOver();   }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美日韩一区二区三区在线观看| 精品视频免费在线| 精品国产污网站| 美女国产一区二区三区| 911精品国产一区二区在线| 亚洲午夜久久久| 欧美一级黄色录像| 激情综合网激情| 国产精品久久午夜夜伦鲁鲁| 成人免费看片app下载| 中文字幕永久在线不卡| 欧亚洲嫩模精品一区三区| 午夜精品久久久久久久久久| 日韩精品中文字幕在线不卡尤物| 国产在线精品不卡| 亚洲欧洲日韩一区二区三区| 色婷婷精品大在线视频| 蜜臀久久久99精品久久久久久| 精品国产一区二区三区不卡| k8久久久一区二区三区| 午夜成人免费电影| 久久综合资源网| 色香蕉久久蜜桃| 免费成人小视频| 亚洲欧洲av色图| 制服丝袜在线91| 不卡电影免费在线播放一区| 一区二区三区**美女毛片| 日韩精品资源二区在线| 99久精品国产| 蜜臀a∨国产成人精品| 专区另类欧美日韩| 日韩午夜电影在线观看| av一区二区不卡| 久久精品国产精品亚洲精品| 亚洲少妇最新在线视频| 欧美va亚洲va国产综合| 欧美丝袜自拍制服另类| 国产91丝袜在线播放九色| 香蕉成人伊视频在线观看| 欧美国产日韩亚洲一区| 欧美一区二区不卡视频| 国产精品久久久久一区二区三区| 一区二区三区欧美视频| 91精品国产日韩91久久久久久| 成人av网站在线| 精品一区二区在线免费观看| 一区二区在线观看不卡| 久久午夜国产精品| 777午夜精品视频在线播放| 国产成人a级片| 日韩中文欧美在线| 一区二区在线电影| 亚洲欧洲成人av每日更新| 日韩视频免费观看高清在线视频| 色婷婷狠狠综合| 99久久久无码国产精品| 国产精品一区在线观看你懂的| 日本va欧美va瓶| 亚洲国产精品久久久久秋霞影院 | 日韩精品中文字幕一区| 色婷婷av一区二区三区gif| 国产精一品亚洲二区在线视频| 日本少妇一区二区| 亚洲成人久久影院| 一区二区成人在线视频| 1024国产精品| 亚洲国产激情av| 亚洲国产成人自拍| 日本一区二区三区dvd视频在线| 精品嫩草影院久久| 日韩精品一区二区三区视频 | 岛国精品在线播放| 国产一级精品在线| 国产伦精品一区二区三区视频青涩| 日本午夜精品视频在线观看| 强制捆绑调教一区二区| 麻豆国产一区二区| 精品亚洲免费视频| 国产一区二区三区黄视频 | 免费看欧美女人艹b| 亚洲国产日日夜夜| 亚洲v中文字幕| 日韩在线卡一卡二| 国产专区欧美精品| 国产成人免费视频网站| 成人美女视频在线观看| av一区二区三区四区| 日本精品视频一区二区| 欧美日韩综合一区| 91麻豆精品国产91久久久更新时间 | 麻豆精品一区二区av白丝在线| 久久精品久久久精品美女| 激情综合网天天干| k8久久久一区二区三区| 欧美性猛片xxxx免费看久爱| 制服丝袜亚洲精品中文字幕| 日韩一区二区免费在线电影| 久久久久久久久久久电影| 中文字幕亚洲综合久久菠萝蜜| 亚洲综合视频在线观看| 美腿丝袜亚洲一区| 成人小视频在线观看| 一本大道av一区二区在线播放| 欧美日韩国产综合视频在线观看| 日韩亚洲电影在线| 国产精品久久午夜| 三级影片在线观看欧美日韩一区二区| 国精产品一区一区三区mba桃花 | 国产在线精品不卡| 色综合久久天天综合网| 3d动漫精品啪啪1区2区免费| 国产欧美久久久精品影院| 一区二区在线观看免费视频播放| 蜜臀va亚洲va欧美va天堂| 国产很黄免费观看久久| 精品视频999| 中文字幕久久午夜不卡| 亚洲第一在线综合网站| 国产麻豆一精品一av一免费| 在线视频亚洲一区| 久久蜜臀中文字幕| 午夜欧美在线一二页| 国产成人综合网站| 欧美日本视频在线| 国产精品久久影院| 精品在线你懂的| 欧美日韩一区高清| 中文字幕 久热精品 视频在线 | 国产精品久久久久久久蜜臀| 日日摸夜夜添夜夜添精品视频 | 成人美女视频在线看| 日韩写真欧美这视频| 亚洲免费观看视频| 国产高清不卡二三区| 欧美一二三区在线观看| 一区二区三区四区五区视频在线观看| 国产在线国偷精品免费看| 欧美日本在线看| 国产日韩欧美精品电影三级在线| 午夜精品在线看| 欧美在线综合视频| 国产精品你懂的在线欣赏| 久久精品国产久精国产| 欧美精品久久99| 亚洲影视资源网| 94-欧美-setu| 国产精品天天摸av网| 精久久久久久久久久久| 欧美一区二区三区视频免费| 一区二区高清在线| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 日韩美女精品在线| 成人妖精视频yjsp地址| 精品国产区一区| 天天影视涩香欲综合网| 欧美日韩在线直播| 亚洲精品视频在线观看免费 | 亚洲综合网站在线观看| 色婷婷综合久久久中文字幕| 欧美国产激情一区二区三区蜜月| 麻豆国产精品一区二区三区| 91精品免费观看| 日精品一区二区| 欧美人与性动xxxx| 午夜久久久久久| 日韩视频免费观看高清完整版| 日产精品久久久久久久性色| 91精品在线麻豆| 久久国产精品一区二区| 欧美zozo另类异族| 国产激情精品久久久第一区二区 | 亚洲精品国产无天堂网2021| 99精品视频在线免费观看| 亚洲国产精品成人综合| 波多野结衣亚洲| 亚洲视频一区二区免费在线观看| 91黄色激情网站| 亚洲成人777| 日韩一卡二卡三卡国产欧美| 久久国产精品99精品国产| 精品成人免费观看| 成人免费高清视频| 一区二区三区四区激情| 欧美吻胸吃奶大尺度电影| 首页国产欧美久久| 欧美成人性福生活免费看| 高清不卡一区二区在线| 亚洲女厕所小便bbb| 911精品产国品一二三产区| 激情综合色综合久久| 国产精品久久久久久久第一福利 | 中文字幕一区二区三中文字幕| 91丝袜美女网| 亚洲成人tv网| 国产日韩视频一区二区三区| 日本韩国欧美一区| 天天av天天翘天天综合网色鬼国产| 日韩午夜在线影院| 成人黄色软件下载|