logging-log4net-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ni...@apache.org
Subject cvs commit: logging-log4net/xdocs/src/release config-examples.xml
Date Thu, 12 May 2005 10:22:26 GMT
nicko       2005/05/12 03:22:26

  Modified:    doc/release config-examples.html
               xdocs/src/release config-examples.xml
  Log:
  Added SQLite example from Ron Grabowski
  
  Revision  Changes    Path
  1.9       +66 -0     logging-log4net/doc/release/config-examples.html
  
  Index: config-examples.html
  ===================================================================
  RCS file: /home/cvs/logging-log4net/doc/release/config-examples.html,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- config-examples.html	2 May 2005 21:34:37 -0000	1.8
  +++ config-examples.html	12 May 2005 10:22:26 -0000	1.9
  @@ -89,6 +89,9 @@
                                                       <a href="#adonetappender-db2">IBM
DB2</a><br/>
       <div class="i1">
                                                                                         
                       </div>
  +                                                    <a href="#adonetappender-sqlite">SQLite</a><br/>
  +    <div class="i1">
  +                                                                                      
                       </div>
                         </div>
   																    <a href="#aspnettraceappender">AspNetTraceAppender</a><br/>
       <div class="i1">
  @@ -513,6 +516,69 @@
   					</pre></div>
   
                         </div>
  +                                                    <h3><a id="adonetappender-sqlite"></a>SQLite</h3>
  +    <div class="i1">
  +                                    <p>
  +						This example shows how to write events to a SQLite Database.
  +						This was tested against v0.21 of the 
  +						<a href="http://sourceforge.net/projects/adodotnetsqlite">SQLite .NET provider</a>.
  +					</p>
  +                                                <p>
  +						SQLite doesn't have strongly-typed columns or field lengths but its 
  +						recommended you still include this information for readability. 
  +						The database table definition is:
  +					</p>
  +                                                
  +    <div class="syntax"><pre class="code">
  +CREATE TABLE Log (
  +	LogId		INTEGER PRIMARY KEY,
  +	Date		DATETIME NOT NULL,
  +	Level		VARCHAR(50) NOT NULL,
  +	Logger		VARCHAR(255) NOT NULL,
  +	Message		TEXT DEFAULT NULL	
  +);
  +					</pre></div>
  +
  +                                                <p>
  +						The appender configuration is:
  +					</p>
  +                                                
  +    <div class="syntax"><pre class="code">
  +&lt;appender name=&quot;AdoNetAppender&quot; type=&quot;log4net.Appender.AdoNetAppender&quot;&gt;
  +	&lt;bufferSize value=&quot;100&quot; /&gt;
  +	&lt;connectionType value=&quot;Finisar.SQLite.SQLiteConnection, SQLite.NET, Version=0.21.1869.3794,
Culture=neutral, PublicKeyToken=c273bd375e695f9c&quot; /&gt;
  +	&lt;connectionString value=&quot;Data Source=c:\\inetpub\\wwwroot\\logs\\log4net.db;Version=3;&quot;
/&gt;
  +	&lt;commandText value=&quot;INSERT INTO Log (Date, Level, Logger, Message) VALUES
(@Date, @Level, @Logger, @Message)&quot; /&gt;
  +	&lt;parameter&gt;
  +		&lt;parameterName value=&quot;@Date&quot; /&gt;
  +		&lt;dbType value=&quot;DateTime&quot; /&gt;
  +		&lt;layout type=&quot;log4net.Layout.RawTimeStampLayout&quot; /&gt;
  +	&lt;/parameter&gt;
  +	&lt;parameter&gt;
  +		&lt;parameterName value=&quot;@Level&quot; /&gt;
  +		&lt;dbType value=&quot;String&quot; /&gt;
  +		&lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
  +			&lt;conversionPattern value=&quot;%level&quot; /&gt;
  +		&lt;/layout&gt;
  +	&lt;/parameter&gt;
  +	&lt;parameter&gt;
  +		&lt;parameterName value=&quot;@Logger&quot; /&gt;
  +		&lt;dbType value=&quot;String&quot; /&gt;
  +		&lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
  +			&lt;conversionPattern value=&quot;%logger&quot; /&gt;
  +		&lt;/layout&gt;
  +	&lt;/parameter&gt;
  +	&lt;parameter&gt;
  +		&lt;parameterName value=&quot;@Message&quot; /&gt;
  +		&lt;dbType value=&quot;String&quot; /&gt;
  +		&lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;
  +			&lt;conversionPattern value=&quot;%message&quot; /&gt;
  +		&lt;/layout&gt;
  +	&lt;/parameter&gt;
  +&lt;/appender&gt;
  +					</pre></div>
  +
  +                      </div>
                         </div>
                                                       <h2><a id="aspnettraceappender"></a>AspNetTraceAppender</h2>
       <div class="i1">
  
  
  
  1.12      +60 -0     logging-log4net/xdocs/src/release/config-examples.xml
  
  Index: config-examples.xml
  ===================================================================
  RCS file: /home/cvs/logging-log4net/xdocs/src/release/config-examples.xml,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- config-examples.xml	2 May 2005 21:12:42 -0000	1.11
  +++ config-examples.xml	12 May 2005 10:22:26 -0000	1.12
  @@ -383,6 +383,66 @@
   					]]></source>
   				</section>				
   				
  +				
  +				<section id="adonetappender-sqlite" name="SQLite">
  +					<p>
  +						This example shows how to write events to a SQLite Database.
  +						This was tested against v0.21 of the 
  +						<a href="http://sourceforge.net/projects/adodotnetsqlite">SQLite .NET provider</a>.
  +					</p>
  +					<p>
  +						SQLite doesn't have strongly-typed columns or field lengths but its 
  +						recommended you still include this information for readability. 
  +						The database table definition is:
  +					</p>
  +					<source language="sql"><![CDATA[
  +CREATE TABLE Log (
  +	LogId		INTEGER PRIMARY KEY,
  +	Date		DATETIME NOT NULL,
  +	Level		VARCHAR(50) NOT NULL,
  +	Logger		VARCHAR(255) NOT NULL,
  +	Message		TEXT DEFAULT NULL	
  +);
  +					]]></source>
  +					<p>
  +						The appender configuration is:
  +					</p>
  +					<source language="xml"><![CDATA[
  +<appender name="AdoNetAppender" type="log4net.Appender.AdoNetAppender">
  +	<bufferSize value="100" />
  +	<connectionType value="Finisar.SQLite.SQLiteConnection, SQLite.NET, Version=0.21.1869.3794,
Culture=neutral, PublicKeyToken=c273bd375e695f9c" />
  +	<connectionString value="Data Source=c:\\inetpub\\wwwroot\\logs\\log4net.db;Version=3;"
/>
  +	<commandText value="INSERT INTO Log (Date, Level, Logger, Message) VALUES (@Date, @Level,
@Logger, @Message)" />
  +	<parameter>
  +		<parameterName value="@Date" />
  +		<dbType value="DateTime" />
  +		<layout type="log4net.Layout.RawTimeStampLayout" />
  +	</parameter>
  +	<parameter>
  +		<parameterName value="@Level" />
  +		<dbType value="String" />
  +		<layout type="log4net.Layout.PatternLayout">
  +			<conversionPattern value="%level" />
  +		</layout>
  +	</parameter>
  +	<parameter>
  +		<parameterName value="@Logger" />
  +		<dbType value="String" />
  +		<layout type="log4net.Layout.PatternLayout">
  +			<conversionPattern value="%logger" />
  +		</layout>
  +	</parameter>
  +	<parameter>
  +		<parameterName value="@Message" />
  +		<dbType value="String" />
  +		<layout type="log4net.Layout.PatternLayout">
  +			<conversionPattern value="%message" />
  +		</layout>
  +	</parameter>
  +</appender>
  +					]]></source>
  +				</section>
  +								
   			</section>
   				
   			
  
  
  

Mime
View raw message