<?xml version="1.0"?>
<doc>
<assembly>
<name>log4net</name>
</assembly>
<members>
<member name="T:log4net.Appender.AdoNetAppender">
<summary>
Appender that logs to a database.
</summary>
<remarks>
<para>
<see cref="T:log4net.Appender.AdoNetAppender"/> appends logging events to a table within a
database. The appender can be configured to specify the connection
string by setting the <see cref="P:log4net.Appender.AdoNetAppender.ConnectionString"/> property.
The connection type (provider) can be specified by setting the <see cref="P:log4net.Appender.AdoNetAppender.ConnectionType"/>
property. For more information on database connection strings for
your specific database see <a href="http://www.connectionstrings.com/">http://www.connectionstrings.com/</a>.
</para>
<para>
Records are written into the database either using a prepared
statement or a stored procedure. The <see cref="P:log4net.Appender.AdoNetAppender.CommandType"/> property
is set to <see cref="F:System.Data.CommandType.Text"/> (<c>System.Data.CommandType.Text</c>) to specify a prepared statement
or to <see cref="F:System.Data.CommandType.StoredProcedure"/> (<c>System.Data.CommandType.StoredProcedure</c>) to specify a stored
procedure.
</para>
<para>
The prepared statement text or the name of the stored procedure
must be set in the <see cref="P:log4net.Appender.AdoNetAppender.CommandText"/> property.
</para>
<para>
The prepared statement or stored procedure can take a number
of parameters. Parameters are added using the <see cref="M:log4net.Appender.AdoNetAppender.AddParameter(log4net.Appender.AdoNetAppenderParameter)"/>
method. This adds a single <see cref="T:log4net.Appender.AdoNetAppenderParameter"/> to the
ordered list of parameters. The <see cref="T:log4net.Appender.AdoNetAppenderParameter"/>
type may be subclassed if required to provide database specific
functionality. The <see cref="T:log4net.Appender.AdoNetAppenderParameter"/> specifies
the parameter name, database type, size, and how the value should
be generated using a <see cref="T:log4net.Layout.ILayout"/>.
</para>
</remarks>
<example>
An example of a SQL Server table that could be logged to:
<code lang="SQL">
CREATE TABLE [dbo].[Log] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[Date] [datetime] NOT NULL ,
[Thread] [varchar] (255) NOT NULL ,
[Level] [varchar] (20) NOT NULL ,
[Logger] [varchar] (255) NOT NULL ,
[Message] [varchar] (4000) NOT NULL
) ON [PRIMARY]
</code>
</example>
<example>
An example configuration to log to the above table:
<code lang="XML" escaped="true">
<appender name="AdoNetAppender_SqlServer" type="log4net.Appender.AdoNetAppender">
<connectionType value="System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<connectionString value="data source=SQLSVR;initial catalog=test_log4net;integrated security=false;persist security info=True;User ID=sa;Password=sa"/>
<commandText value="INSERT INTO Log ([Date],[Thread],[Level],[Logger],[Message]) VALUES (@log_date, @thread, @log_level, @logger, @message)"/>
<parameter>
<parameterName value="@log_date"/>
<dbType value="DateTime"/>
<layout type="log4net.Layout.PatternLayout" value="%date{yyyy'-'MM'-'dd HH':'mm':'ss'.'fff}"/>
</parameter>
<parameter>
<parameterName value="@thread"/>
<dbType value="String"/>
<size value="255"/>
<layout type="log4net.Layout.PatternLayout" value="%thread"/>
</parameter>
<parameter>
<parameterName value="@log_level"/>
<dbType value="String"/>
<size value="50"/>
<layout type="log4net.Layout.PatternLayout" value="%level"/>
</parameter>
<parameter>
<parameterName value="@logger"/>
<dbType value="String"/>
<size value="255"/>
<layout type="log4net.Layout.PatternLayout" value="%logger"/>
</parameter>
<parameter>
<parameterName value="@message"/>
<dbType value="String"/>
<size value="4000"/>
<layout type="log4net.Layout.PatternLayout" value="%message"/>
</parameter>
</appender>
</code>
</example>
<author>Julian Biddle</author>
<author>Nicko Cadell</author>
<author>Gert Driesen</author>
<author>Lance Nehring</author>
</member>
<member name="T:log4net.Appender.BufferingAppenderSkeleton">
<summary>
Abstract base class implementation of <see cref="T:log4net.Appender.IAppender"/> that
buffers events in a fixed size buffer.
</summary>
<remarks>
<para>
This base class should be used by appenders that need to buffer a
number of events before logging them. For example the <see cref="T:log4net.Appender.AdoNetAppender"/>
buffers events and then submits the entire contents of the buffer to
the underlying database in one go.
</para>
<para>
Subclasses should override the <see cref="M:SendBuffer(LoggingEvent[])"/>
method to deliver the buffered events.
</para>
<para>The BufferingAppenderSkeleton maintains a fixed size cyclic
buffer of events. The size of the buffer is set using
the <see cref="P:log4net.Appender.BufferingAppenderSkeleton.BufferSize"/> property.
</para>
<para>A <see cref="T:log4net.Core.ITriggeringEventEvaluator"/> is used to inspect
each event as it arrives in the appender. If the <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Evaluator"/>
triggers, then the current buffer is sent immediately
(see <see cref="M:SendBuffer(LoggingEvent[])"/>). Otherwise the event
is stored in the buffer. For example, an evaluator can be used to
deliver the events immediately when an ERROR event arrives.
</para>
<para>
The buffering appender can be configured in a <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Lossy"/> mode.
By default the appender is NOT lossy. When the buffer is full all
the buffered events are sent with <see cref="M:SendBuffer(LoggingEvent[])"/>.
If the <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Lossy"/> property is set to <c>true</c> then the
buffer will not be sent when it is full, and new events arriving
in the appender will overwrite the oldest event in the buffer.
In lossy mode the buffer will only be sent when the <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Evaluator"/>
triggers. This can be useful behavior when you need to know about
ERROR events but not about events with a lower level, configure an
evaluator that will trigger when an
没有合适的资源?快使用搜索试试~ 我知道了~
列车运行图程序可用软件
共26个文件
dll:9个
nlp:5个
xlsx:3个
需积分: 5 9 下载量 14 浏览量
2019-05-21
20:57:39
上传
评论 14
收藏 3.91MB RAR 举报
温馨提示
此代码是关于列车运行图操作的部分功能演示,包括源码,debug程序等,数据使用的是Excel文档,由于数据保密,需要自行添加,数据格式采用文本形式,时间如05:00:00,05:01:08,保持到发到发的顺序弄成一行为一个车次。数据量的多少可以自行添加。
资源推荐
资源详情
资源评论
收起资源包目录
Debug.rar (26个子文件)
Debug
八通线牵引制动特性.xlsx 10KB
log4net.dll 298KB
NPOI.OpenXmlFormats.dll 1.98MB
normidna.nlp 58KB
NPOI.OpenXml4Net.dll 87KB
ICSharpCode.SharpZipLib.dll 192KB
八通线平日-最终格式.xlsx 110KB
log4net.xml 1.46MB
NPOI.OOXML.dll 518KB
MID Example.pdb 66KB
MID Example.vshost.exe.config 165B
table_s.xlsx 10KB
mscorlib.dll 5.38MB
MID Example.exe.config 165B
ICSharpCode.SharpZipLib.xml 510KB
normnfc.nlp 46KB
MID Example.vshost.exe 22KB
MID Example.exe 50KB
MID Example.vshost.exe.manifest 490B
normnfd.nlp 40KB
zh-Hans
mscorlib.resources.dll 992KB
normnfkd.nlp 60KB
NPOI.dll 1.55MB
Train.dll 57KB
log4net.pdb 1.06MB
normnfkc.nlp 66KB
共 26 条
- 1
资源评论
致知于行
- 粉丝: 193
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功