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

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

?? rollingfileappender.cs

?? 詳細講述了數據庫編程
?? CS
?? 第 1 頁 / 共 4 頁
字號:
#region Copyright & License
//
// Copyright 2001-2006 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.
//
#endregion

using System;
using System.Collections;
using System.Globalization;
using System.IO;

using log4net.Util;
using log4net.Core;

namespace log4net.Appender
{
#if CONFIRM_WIN32_FILE_SHAREMODES
	// The following sounds good, and I though it was the case, but after
	// further testing on Windows I have not been able to confirm it.

	/// On the Windows platform if another process has a write lock on the file 
	/// that is to be deleted, but allows shared read access to the file then the
	/// file can be moved, but cannot be deleted. If the other process also allows 
	/// shared delete access to the file then the file will be deleted once that 
	/// process closes the file. If it is necessary to open the log file or any
	/// of the backup files outside of this appender for either read or 
	/// write access please ensure that read and delete share modes are enabled.
#endif

	/// <summary>
	/// Appender that rolls log files based on size or date or both.
	/// </summary>
	/// <remarks>
	/// <para>
	/// RollingFileAppender can roll log files based on size or date or both
	/// depending on the setting of the <see cref="RollingStyle"/> property.
	/// When set to <see cref="RollingMode.Size"/> the log file will be rolled
	/// once its size exceeds the <see cref="MaximumFileSize"/>.
	/// When set to <see cref="RollingMode.Date"/> the log file will be rolled
	/// once the date boundary specified in the <see cref="DatePattern"/> property
	/// is crossed.
	/// When set to <see cref="RollingMode.Composite"/> the log file will be
	/// rolled once the date boundary specified in the <see cref="DatePattern"/> property
	/// is crossed, but within a date boundary the file will also be rolled
	/// once its size exceeds the <see cref="MaximumFileSize"/>.
	/// When set to <see cref="RollingMode.Once"/> the log file will be rolled when
	/// the appender is configured. This effectively means that the log file can be
	/// rolled once per program execution.
	/// </para>
	/// <para>
	/// A of few additional optional features have been added:
	/// <list type="bullet">
	/// <item>Attach date pattern for current log file <see cref="StaticLogFileName"/></item>
	/// <item>Backup number increments for newer files <see cref="CountDirection"/></item>
	/// <item>Infinite number of backups by file size <see cref="MaxSizeRollBackups"/></item>
	/// </list>
	/// </para>
	/// 
	/// <note>
	/// <para>
	/// For large or infinite numbers of backup files a <see cref="CountDirection"/> 
	/// greater than zero is highly recommended, otherwise all the backup files need
	/// to be renamed each time a new backup is created.
	/// </para>
	/// <para>
	/// When Date/Time based rolling is used setting <see cref="StaticLogFileName"/> 
	/// to <see langword="true"/> will reduce the number of file renamings to few or none.
	/// </para>
	/// </note>
	/// 
	/// <note type="caution">
	/// <para>
	/// Changing <see cref="StaticLogFileName"/> or <see cref="CountDirection"/> without clearing
	/// the log file directory of backup files will cause unexpected and unwanted side effects.  
	/// </para>
	/// </note>
	/// 
	/// <para>
	/// If Date/Time based rolling is enabled this appender will attempt to roll existing files
	/// in the directory without a Date/Time tag based on the last write date of the base log file.
	/// The appender only rolls the log file when a message is logged. If Date/Time based rolling 
	/// is enabled then the appender will not roll the log file at the Date/Time boundary but
	/// at the point when the next message is logged after the boundary has been crossed.
	/// </para>
	/// 
	/// <para>
	/// The <see cref="RollingFileAppender"/> extends the <see cref="FileAppender"/> and
	/// has the same behavior when opening the log file.
	/// The appender will first try to open the file for writing when <see cref="ActivateOptions"/>
	/// is called. This will typically be during configuration.
	/// If the file cannot be opened for writing the appender will attempt
	/// to open the file again each time a message is logged to the appender.
	/// If the file cannot be opened for writing when a message is logged then
	/// the message will be discarded by this appender.
	/// </para>
	/// <para>
	/// When rolling a backup file necessitates deleting an older backup file the
	/// file to be deleted is moved to a temporary name before being deleted.
	/// </para>
	/// 
	/// <note type="caution">
	/// <para>
	/// A maximum number of backup files when rolling on date/time boundaries is not supported.
	/// </para>
	/// </note>
	/// </remarks>
	/// <author>Nicko Cadell</author>
	/// <author>Gert Driesen</author>
	/// <author>Aspi Havewala</author>
	/// <author>Douglas de la Torre</author>
	/// <author>Edward Smit</author>
	public class RollingFileAppender : FileAppender
	{
		#region Public Enums

		/// <summary>
		/// Style of rolling to use
		/// </summary>
		/// <remarks>
		/// <para>
		/// Style of rolling to use
		/// </para>
		/// </remarks>
		public enum RollingMode
		{
			/// <summary>
			/// Roll files once per program execution
			/// </summary>
			/// <remarks>
			/// <para>
			/// Roll files once per program execution.
			/// Well really once each time this appender is
			/// configured.
			/// </para>
			/// <para>
			/// Setting this option also sets <c>AppendToFile</c> to
			/// <c>false</c> on the <c>RollingFileAppender</c>, otherwise
			/// this appender would just be a normal file appender.
			/// </para>
			/// </remarks>
			Once		= 0,

			/// <summary>
			/// Roll files based only on the size of the file
			/// </summary>
			Size		= 1,

			/// <summary>
			/// Roll files based only on the date
			/// </summary>
			Date		= 2,

			/// <summary>
			/// Roll files based on both the size and date of the file
			/// </summary>
			Composite	= 3
		}

		#endregion

		#region Protected Enums

		/// <summary>
		/// The code assumes that the following 'time' constants are in a increasing sequence.
		/// </summary>
		/// <remarks>
		/// <para>
		/// The code assumes that the following 'time' constants are in a increasing sequence.
		/// </para>
		/// </remarks>
		protected enum RollPoint
		{
			/// <summary>
			/// Roll the log not based on the date
			/// </summary>
			InvalidRollPoint	=-1,

			/// <summary>
			/// Roll the log for each minute
			/// </summary>
			TopOfMinute			= 0,

			/// <summary>
			/// Roll the log for each hour
			/// </summary>
			TopOfHour			= 1,

			/// <summary>
			/// Roll the log twice a day (midday and midnight)
			/// </summary>
			HalfDay				= 2,

			/// <summary>
			/// Roll the log each day (midnight)
			/// </summary>
			TopOfDay			= 3,

			/// <summary>
			/// Roll the log each week
			/// </summary>
			TopOfWeek			= 4,

			/// <summary>
			/// Roll the log each month
			/// </summary>
			TopOfMonth			= 5
		}

		#endregion Protected Enums

		#region Public Instance Constructors

		/// <summary>
		/// Initializes a new instance of the <see cref="RollingFileAppender" /> class.
		/// </summary>
		/// <remarks>
		/// <para>
		/// Default constructor.
		/// </para>
		/// </remarks>
		public RollingFileAppender() 
		{
			m_dateTime = new DefaultDateTime();
		}

		#endregion Public Instance Constructors

		#region Public Instance Properties

		/// <summary>
		/// Gets or sets the date pattern to be used for generating file names
		/// when rolling over on date.
		/// </summary>
		/// <value>
		/// The date pattern to be used for generating file names when rolling 
		/// over on date.
		/// </value>
		/// <remarks>
		/// <para>
		/// Takes a string in the same format as expected by 
		/// <see cref="log4net.DateFormatter.SimpleDateFormatter" />.
		/// </para>
		/// <para>
		/// This property determines the rollover schedule when rolling over
		/// on date.
		/// </para>
		/// </remarks>
		public string DatePattern
		{
			get { return m_datePattern; }
			set { m_datePattern = value; }
		}
  
		/// <summary>
		/// Gets or sets the maximum number of backup files that are kept before
		/// the oldest is erased.
		/// </summary>
		/// <value>
		/// The maximum number of backup files that are kept before the oldest is
		/// erased.
		/// </value>
		/// <remarks>
		/// <para>
		/// If set to zero, then there will be no backup files and the log file 
		/// will be truncated when it reaches <see cref="MaxFileSize"/>.  
		/// </para>
		/// <para>
		/// If a negative number is supplied then no deletions will be made.  Note 
		/// that this could result in very slow performance as a large number of 
		/// files are rolled over unless <see cref="CountDirection"/> is used.
		/// </para>
		/// <para>
		/// The maximum applies to <b>each</b> time based group of files and 
		/// <b>not</b> the total.
		/// </para>
		/// </remarks>
		public int MaxSizeRollBackups
		{
			get { return m_maxSizeRollBackups; }
			set { m_maxSizeRollBackups = value; }
		}
  
		/// <summary>
		/// Gets or sets the maximum size that the output file is allowed to reach
		/// before being rolled over to backup files.
		/// </summary>
		/// <value>
		/// The maximum size in bytes that the output file is allowed to reach before being 
		/// rolled over to backup files.
		/// </value>
		/// <remarks>
		/// <para>
		/// This property is equivalent to <see cref="MaximumFileSize"/> except
		/// that it is required for differentiating the setter taking a
		/// <see cref="long"/> argument from the setter taking a <see cref="string"/> 
		/// argument.
		/// </para>
		/// <para>
		/// The default maximum file size is 10MB (10*1024*1024).
		/// </para>
		/// </remarks>
		public long MaxFileSize
		{
			get { return m_maxFileSize; }
			set { m_maxFileSize = value; }
		}
  
		/// <summary>
		/// Gets or sets the maximum size that the output file is allowed to reach
		/// before being rolled over to backup files.
		/// </summary>
		/// <value>
		/// The maximum size that the output file is allowed to reach before being 
		/// rolled over to backup files.
		/// </value>
		/// <remarks>
		/// <para>
		/// This property allows you to specify the maximum size with the
		/// suffixes "KB", "MB" or "GB" so that the size is interpreted being 
		/// expressed respectively in kilobytes, megabytes or gigabytes. 
		/// </para>
		/// <para>
		/// For example, the value "10KB" will be interpreted as 10240 bytes.
		/// </para>
		/// <para>
		/// The default maximum file size is 10MB.
		/// </para>
		/// <para>
		/// If you have the option to set the maximum file size programmatically
		/// consider using the <see cref="MaxFileSize"/> property instead as this
		/// allows you to set the size in bytes as a <see cref="Int64"/>.
		/// </para>
		/// </remarks>
		public string MaximumFileSize
		{
			get { return m_maxFileSize.ToString(NumberFormatInfo.InvariantInfo); }
			set { m_maxFileSize = OptionConverter.ToFileSize(value, m_maxFileSize + 1); }
		}

		/// <summary>
		/// Gets or sets the rolling file count direction. 
		/// </summary>
		/// <value>
		/// The rolling file count direction.
		/// </value>
		/// <remarks>
		/// <para>
		/// Indicates if the current file is the lowest numbered file or the
		/// highest numbered file.
		/// </para>
		/// <para>
		/// By default newer files have lower numbers (<see cref="CountDirection" /> &lt; 0),
		/// i.e. log.1 is most recent, log.5 is the 5th backup, etc...
		/// </para>
		/// <para>
		/// <see cref="CountDirection" /> &gt;= 0 does the opposite i.e.
		/// log.1 is the first backup made, log.5 is the 5th backup made, etc.
		/// For infinite backups use <see cref="CountDirection" /> &gt;= 0 to reduce 
		/// rollover costs.
		/// </para>
		/// <para>The default file count direction is -1.</para>
		/// </remarks>
		public int CountDirection
		{
			get { return m_countDirection; }
			set { m_countDirection = value; }
		}
  
		/// <summary>
		/// Gets or sets the rolling style.
		/// </summary>
		/// <value>The rolling style.</value>
		/// <remarks>
		/// <para>
		/// The default rolling style is <see cref="RollingMode.Composite" />.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
69久久夜色精品国产69蝌蚪网| 亚洲黄色av一区| 国产一区二区免费看| 久久这里只有精品视频网| 国产福利视频一区二区三区| 中文字幕一区免费在线观看| 91久久久免费一区二区| 亚洲一区二区三区爽爽爽爽爽| 欧美一区二区三区视频| 国产99久久久国产精品潘金| 亚洲精品久久久蜜桃| 亚洲日本欧美天堂| 久久综合色之久久综合| 精品粉嫩超白一线天av| 色综合一个色综合亚洲| 午夜精品在线看| 久久精品亚洲麻豆av一区二区 | 亚洲成a天堂v人片| 久久影院视频免费| 久久精品欧美一区二区三区不卡| 久久亚洲综合色| 久久蜜桃av一区二区天堂 | 久久久精品一品道一区| 久久久久久久国产精品影院| 国产欧美日韩在线观看| 欧美精品乱码久久久久久| 国产成人aaa| 91影院在线免费观看| 久久av老司机精品网站导航| 亚洲视频1区2区| 亚洲美女在线一区| 国产精品美女久久久久久久久| 欧美一区二区在线不卡| 日韩精品一区二区三区视频在线观看| 91福利视频网站| 欧美一区二区三区在线视频| 久久一区二区三区四区| ㊣最新国产の精品bt伙计久久| 亚洲男人的天堂在线观看| 香蕉加勒比综合久久| 精品在线视频一区| 日本欧美韩国一区三区| 1000精品久久久久久久久| 亚洲综合在线电影| 亚洲人成小说网站色在线 | 色欧美日韩亚洲| 成人黄色大片在线观看| 国产一区二区在线看| av动漫一区二区| 99热这里都是精品| 91精选在线观看| 国产精品免费久久| 亚洲一区国产视频| 国产一区二区不卡在线| 欧美日免费三级在线| 欧美午夜精品久久久久久孕妇| 欧美性色欧美a在线播放| 欧美va亚洲va国产综合| 精品福利在线导航| 亚洲一区二区av电影| 国产精品2024| 成人av免费在线观看| 欧美高清视频www夜色资源网| 国产女主播一区| 日韩国产成人精品| 91免费视频网| 久久精品无码一区二区三区| 亚洲成人在线免费| 成人av在线资源| 26uuu国产日韩综合| 亚洲h精品动漫在线观看| 成人综合婷婷国产精品久久免费| 成人激情校园春色| 日韩精品一区在线| 亚洲电影一区二区| 日本中文字幕不卡| 欧美午夜影院一区| 国产精品日产欧美久久久久| 蜜桃av一区二区三区电影| 国产精品99久久久| 欧美一区二区三区视频免费| 亚洲愉拍自拍另类高清精品| www.久久久久久久久| 国产欧美va欧美不卡在线| 黄一区二区三区| 99久久久国产精品免费蜜臀| 欧美日韩国产美女| 亚洲精品在线观看视频| 天天免费综合色| 欧美伊人精品成人久久综合97| 中文字幕在线不卡| 成人综合在线网站| 中文字幕乱码日本亚洲一区二区| 亚洲精品大片www| www.欧美.com| 中文字幕日本乱码精品影院| 成人永久免费视频| 国产午夜精品一区二区三区四区 | 色综合久久久久综合| 国产精品狼人久久影院观看方式| 亚洲综合区在线| 日韩高清不卡一区二区| 欧美精品第1页| 亚洲成人资源在线| 91精品午夜视频| 日本在线不卡视频| 欧美一卡二卡在线| 美女mm1313爽爽久久久蜜臀| 欧美电影免费观看高清完整版在| 毛片基地黄久久久久久天堂| 日韩视频国产视频| 亚洲国产日韩av| 欧洲国内综合视频| 中文天堂在线一区| av一区二区三区| 亚洲欧美一区二区三区国产精品| 99在线精品免费| 亚洲综合色自拍一区| 欧美乱妇20p| 久久国产精品免费| 国产日韩欧美综合在线| 成人一级片网址| 亚洲视频每日更新| 欧美日韩电影一区| 久久国产麻豆精品| 日本一区二区免费在线| 99re成人精品视频| 亚洲国产精品影院| 日韩视频在线你懂得| 精品亚洲成a人在线观看| 久久久国产午夜精品| 成人不卡免费av| 亚洲国产成人av网| 日韩一区二区不卡| 国产精品一品二品| 亚洲日本va午夜在线电影| 欧美探花视频资源| 精品一区二区在线视频| 国产精品久久二区二区| 欧美视频在线观看一区二区| 麻豆精品视频在线| 国产精品欧美一级免费| 欧美吻胸吃奶大尺度电影| 久久99精品国产91久久来源| 国产精品美女www爽爽爽| 欧美三级一区二区| 黄色资源网久久资源365| 国产精品视频免费| 欧美年轻男男videosbes| 国产一级精品在线| 亚洲激情第一区| 久久综合精品国产一区二区三区| 成人国产亚洲欧美成人综合网| 一区二区三区在线影院| 欧美大片拔萝卜| 色综合久久久久久久久久久| 久久疯狂做爰流白浆xx| 亚洲女女做受ⅹxx高潮| 精品少妇一区二区三区| 色综合久久中文综合久久牛| 毛片不卡一区二区| 亚洲精品中文在线| 久久伊人中文字幕| 欧美绝品在线观看成人午夜影视| 国产成人综合网| 石原莉奈在线亚洲三区| 欧美丰满一区二区免费视频| 成人高清视频在线| 日本不卡一二三区黄网| 精品国产伦理网| 欧美午夜电影网| 99久久精品国产精品久久| 蜜桃精品视频在线观看| 亚洲综合色区另类av| 国产精品入口麻豆原神| 亚洲精品在线电影| 欧美日韩国产一级片| 97se亚洲国产综合自在线| 狠狠色综合播放一区二区| 亚洲精品视频免费观看| 久久久影视传媒| 欧美videossexotv100| 欧美人体做爰大胆视频| 一本一本大道香蕉久在线精品| 国产精品一区二区三区四区| 视频一区国产视频| 亚洲成人免费在线观看| 国产精品第四页| 国产亚洲自拍一区| 日韩欧美一区二区视频| 欧美日本不卡视频| 欧美三级资源在线| 色就色 综合激情| 成人国产视频在线观看| 国产成a人亚洲| 国产成人午夜99999| 国产一区美女在线| 狠狠色狠狠色综合系列| 免费成人性网站| 美女www一区二区|