<rss version="2.0" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"><channel><title>Log4Net Dashboard / Log4Net Viewer</title><link>http://www.l4ndash.com</link><description>RSS feeds for Log4Net Dashboard / Log4Net Viewer</description><ttl>60</ttl><item><comments>http://www.l4ndash.com/News/tabid/69/ctl/ArticleView/mid/413/articleId/6/Logging-tutorials.aspx#Comments</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.l4ndash.com/DesktopModules/DnnForge%20-%20NewsArticles/RssComments.aspx?TabID=69&amp;ModuleID=413&amp;ArticleID=6</wfw:commentRss><trackback:ping>http://www.l4ndash.com/DesktopModules/DnnForge%20-%20NewsArticles/Tracking/Trackback.aspx?ArticleID=6&amp;PortalID=0&amp;TabID=69</trackback:ping><title>Logging tutorials</title><link>http://www.l4ndash.com/News/tabid/69/ctl/ArticleView/mid/413/articleId/6/Logging-tutorials.aspx</link><description>Jim Christopher has written several excellent tutorials about log4net, and he promise to write more!  http://www.beefycode.com/?tag=/log4net</description><dc:creator>Georg Jansen</dc:creator><pubDate>Mon, 15 Sep 2008 13:29:00 GMT</pubDate><guid isPermaLink="false">f1397696-738c-4295-afcd-943feb885714:6</guid></item><item><comments>http://www.l4ndash.com/News/tabid/69/ctl/ArticleView/mid/413/articleId/12/Log4Net-1210-is-released.aspx#Comments</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.l4ndash.com/DesktopModules/DnnForge%20-%20NewsArticles/RssComments.aspx?TabID=69&amp;ModuleID=413&amp;ArticleID=12</wfw:commentRss><trackback:ping>http://www.l4ndash.com/DesktopModules/DnnForge%20-%20NewsArticles/Tracking/Trackback.aspx?ArticleID=12&amp;PortalID=0&amp;TabID=69</trackback:ping><title>Log4Net 1.2.10 is released</title><link>http://www.l4ndash.com/News/tabid/69/ctl/ArticleView/mid/413/articleId/12/Log4Net-1210-is-released.aspx</link><description>Finally Log4Net is no longer in beta, version 1.2.10 is released.A lot of people have been waiting for a “non-beta” version of log4net. Even though, version 1.2.9 have been around for quiet a while, and for most users, have proven to be more stable than a lot of commercial production releases. The complete release notes can be found on:  http://logging.apache.org/log4net/release/release-notes.html  </description><dc:creator>Georg Jansen</dc:creator><pubDate>Wed, 26 Apr 2006 13:54:00 GMT</pubDate><guid isPermaLink="false">f1397696-738c-4295-afcd-943feb885714:12</guid></item><item><comments>http://www.l4ndash.com/News/tabid/69/ctl/ArticleView/mid/413/articleId/17/Programmatically-changing-log-file-names-in-Log4net.aspx#Comments</comments><slash:comments>16</slash:comments><wfw:commentRss>http://www.l4ndash.com/DesktopModules/DnnForge%20-%20NewsArticles/RssComments.aspx?TabID=69&amp;ModuleID=413&amp;ArticleID=17</wfw:commentRss><trackback:ping>http://www.l4ndash.com/DesktopModules/DnnForge%20-%20NewsArticles/Tracking/Trackback.aspx?ArticleID=17&amp;PortalID=0&amp;TabID=69</trackback:ping><title>Programmatically changing log file names in Log4net</title><link>http://www.l4ndash.com/News/tabid/69/ctl/ArticleView/mid/413/articleId/17/Programmatically-changing-log-file-names-in-Log4net.aspx</link><description>I needed to be able to change the file log4net was logging on programmatically, on the same time I wanted to use the other configuration options available in the config file.

After several different approaches I ended up with writing a method like the one listed below:

static bool ChangeLogFileName(string AppenderName, string NewFilename)
{

log4net.Repository.ILoggerRepository RootRep;
RootRep = log4net.LogManager.GetRepository();

foreach (log4net.Appender.IAppender iApp in RootRep.GetAppenders())
{
if (iApp.Name.CompareTo(AppenderName) == 0
&amp;amp;&amp;amp; iApp is log4net.Appender.FileAppender)
{
log4net.Appender.FileAppender fApp = (log4net.Appender.FileAppender)iApp;

fApp.File = NewFilename;
fApp.ActivateOptions();
return true; // Appender found and name changed to NewFilename
}
}

return false; // appender not found
}

The method basically search through all appenders to find the appender named in the input parameter. When an appender with the right name is found, it check if the appender is a FileAppender (or to be more precise, that the object found, implement the IFileAppender interface).

I anyone know a more efficient way to find a named appender, I would very much like to know about it.

I found out that using a standard configuration section in the config file failed if the filename was missing, and if a filename was stated that file would be created during the normal configuration (log4net.Config.XmlConfigurator.Configure()), therefore I ended up using the nul device as the filename. My config section is listed below:


&amp;lt;appender name="FileAppender" type="log4net.Appender.FileAppender"&amp;gt;
&amp;lt;param name="File" value="nul"/&amp;gt; 
&amp;lt;appendToFile value="true"/&amp;gt;
&amp;lt;layout type="log4net.Layout.PatternLayout"&amp;gt;
&amp;lt;conversionPattern value="%date [%thread] %-5level %logger - %message%newline"/&amp;gt;
layout&amp;gt;
appender&amp;gt;

Since the RollingFileAppender inherits the FileAppender, the same method will also work with the RollingFileAppender.

Using the nul device, causes the RollingFileAppender to issue some internal error messages during configuration (you will be able to see they if you turn on internal log4net debug).

A small sidenote on the nul device. The nul device or the “nul” filename has been around in Windows and Dos since the beginning of time, at least since Dos 2.0. I believe it is inherited from the unix operating system. If you try to write to a file named nul, the content you write to the file will simply disappear. You can try it out with Notepad, save a file on c:\nul.txt, you will be warned that the file already exists, but you will be able to save to it. But you will never be able to retrieve anything (WROM Write only memory).
</description><dc:creator>Georg Jansen</dc:creator><pubDate>Tue, 24 Jan 2006 15:03:00 GMT</pubDate><guid isPermaLink="false">f1397696-738c-4295-afcd-943feb885714:17</guid></item><item><comments>http://www.l4ndash.com/News/tabid/69/ctl/ArticleView/mid/413/articleId/22/Log4Net-Mail-archive-available-on-wwwl4ndashcom.aspx#Comments</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.l4ndash.com/DesktopModules/DnnForge%20-%20NewsArticles/RssComments.aspx?TabID=69&amp;ModuleID=413&amp;ArticleID=22</wfw:commentRss><trackback:ping>http://www.l4ndash.com/DesktopModules/DnnForge%20-%20NewsArticles/Tracking/Trackback.aspx?ArticleID=22&amp;PortalID=0&amp;TabID=69</trackback:ping><title>Log4Net Mail archive available on www.l4ndash.com</title><link>http://www.l4ndash.com/News/tabid/69/ctl/ArticleView/mid/413/articleId/22/Log4Net-Mail-archive-available-on-wwwl4ndashcom.aspx</link><description>When it comes to Log4Net, it is one definitive source of information, and that is the log4net mailing list (log4net-user@logging.apache.org). 

I have made a copy of the Log4Net Mail available on http://www.l4ndash.com, and can be viewed as a forum on: http://www.l4ndash.com/Log4NetMailArchive/tabid/70/view/topics/forumid/1/Default.aspx.

The mail archive is also available trough RSS: http://www.l4ndash.com/desktopmodules/ntforums/rss.aspx?portalid=0&amp;amp;forumid=1&amp;amp;tabid=70&amp;amp;moduleid=426

And I have a RSS which gives only the latest additions: http://www.l4ndash.com/desktopmodules/activeforumstopposts/rss.aspx?tabid=36&amp;amp;moduleid=427

My intentions is to update the mail archive every day, making it more up to date than the other available mail archives. From time to time the Log4Net developer mailing list (log4net-dev@logging.apache.org) contain threads which also is of interest to ordinary users, I will therefore also include some threads from this mailing list, making this mail archive a complete reference for the log4net community. 
</description><dc:creator>Georg Jansen</dc:creator><pubDate>Tue, 29 Nov 2005 15:09:00 GMT</pubDate><guid isPermaLink="false">f1397696-738c-4295-afcd-943feb885714:22</guid></item><item><comments>http://www.l4ndash.com/News/tabid/69/ctl/ArticleView/mid/413/articleId/23/Lossy-logging-in-Log4Net.aspx#Comments</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.l4ndash.com/DesktopModules/DnnForge%20-%20NewsArticles/RssComments.aspx?TabID=69&amp;ModuleID=413&amp;ArticleID=23</wfw:commentRss><trackback:ping>http://www.l4ndash.com/DesktopModules/DnnForge%20-%20NewsArticles/Tracking/Trackback.aspx?ArticleID=23&amp;PortalID=0&amp;TabID=69</trackback:ping><title>Lossy logging in Log4Net</title><link>http://www.l4ndash.com/News/tabid/69/ctl/ArticleView/mid/413/articleId/23/Lossy-logging-in-Log4Net.aspx</link><description>One of the more exotic and advanced features of Log4net is lossy logging.
&amp;#160;
Actually the idea behind it is simply great, it supports the typical production scenario of: As long as everything is working, I don’t want my log filled up with debug (or info) messages, but when an error occurs, I would like to have all the messages that leads to this error situation.
&amp;#160;
And that’s what lossy logging is all about!
&amp;#160;
Implementing lossy logging is done through configuration, and as always in Log4net, configuration takes place in the configuration file, i.e. you don’t have to change your program.
&amp;#160;
To configure an appender to implement lossy logging, you need to write the following configuration statements in the config file:
&amp;#160;
&amp;lt;lossy value="true" /&amp;gt; 
&amp;#160;
&amp;lt;bufferSize value="10" /&amp;gt;
&amp;#160;
&amp;lt;evaluator type="log4net.Core.LevelEvaluator"&amp;gt;
&amp;#160;
&amp;lt;threshold value="ERROR"/&amp;gt;
&amp;#160;
evaluator&amp;gt;
&amp;#160;
Translated, this means: Log the last 10 messages every time an error (or fatal) message is encountered.
&amp;#160;
Lossy logging is supported by the appenders which are based on the BufferingAppenderSkeleton, currently that is AdoNetAppender, RemotingAppender, SmtpAppender, SmtpPickupDirAppender or BufferingForwardingAppender.


If you are using another appender, you need a detour to the BufferingForwardingAppender, and have the BufferingForwardingAppender deliver the log rows to your appender of choice. 
&amp;#160;
I wrote a small test program enclosed below:
&amp;#160;
using System;
&amp;#160;
using System.Text;
&amp;#160;
&amp;#160;
&amp;#160;
[assembly: log4net.Config.XmlConfigurator(Watch = true)]
&amp;#160;
&amp;#160;
namespace L4NTest
&amp;#160;
{
&amp;#160;
class Program
&amp;#160;
{
&amp;#160;
private static readonly log4net.ILog log 
&amp;#160;
= log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
&amp;#160;
&amp;#160;
&amp;#160;
static void Main(string[] args)
&amp;#160;
{
&amp;#160;
TestLossy();
&amp;#160;
}
&amp;#160;
&amp;#160;
&amp;#160;
static void TestLossy()
&amp;#160;
{
&amp;#160;
int logno = 0;
&amp;#160;
&amp;#160;
&amp;#160;
for (int i = 0; i &amp;lt; 20; i++)
&amp;#160;
log.Debug("Log message no: " + (++logno).ToString());
&amp;#160;
&amp;#160;
&amp;#160;
log.Error("Error message no: " + (++logno).ToString());
&amp;#160;
&amp;#160;
&amp;#160;
for (int i = 0; i &amp;lt; 10; i++)
&amp;#160;
log.Debug("Log message no: " + (++logno).ToString());
&amp;#160;
}
&amp;#160;
}
&amp;#160;
}
&amp;#160;
&amp;#160;
This test program writes 31 log rows, first 20 debug rows, one error row and then 10 debug rows.
&amp;#160;
To test this I used two appenders, one FileAppender and on AdoNetAppender. The FileAppender was not configured to be lossy (in fact the FileAppender does not support Lossy), the AdoNetAppender was configured to be lossy and to log 10 rows if an Error occurred.
&amp;#160;
The complete configuration file for my test program is listed below:
&amp;#160;
xml version="1.0" encoding="utf-8" ?&amp;gt;
&amp;#160;
&amp;lt;configuration&amp;gt;
&amp;#160;
&amp;lt;configSections&amp;gt;
&amp;#160;
&amp;lt;section name="log4net" type="System.Configuration.IgnoreSectionHandler"/&amp;gt;
&amp;#160;
&amp;lt;/configSections&amp;gt;
&amp;#160;
&amp;#160;
&amp;#160;
&amp;lt;appSettings&amp;gt;
&amp;#160;
&amp;lt;add key="log4net.Internal.Debug" value="true"/&amp;gt;
&amp;#160;
appSettings&amp;gt; 
&amp;#160;

&amp;#160;
&amp;#160;
&amp;lt;log4net&amp;gt;
&amp;#160;
&amp;lt;appender name="AdoNetAppender" type="log4net.Appender.AdoNetAppender"&amp;gt;
&amp;#160;
&amp;#160;
&amp;lt;connectionType value="System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/&amp;gt;
&amp;#160;
&amp;lt;connectionString value="Data Source=(Local); initial Catalog=Log4Net;Integrated Security=True;"/&amp;gt;
&amp;#160;
&amp;lt;commandText value="INSERT INTO Log4Net ([Date],[Thread],[Level],[Logger],[Message],[Exception]) VALUES (@log_date, @thread, @log_level, @logger, @message, @exception)"/&amp;gt;
&amp;#160;
&amp;#160;
&amp;lt;lossy value="true" /&amp;gt; 
&amp;#160;
&amp;lt;bufferSize value="10" /&amp;gt;
&amp;#160;
&amp;lt;evaluator type="log4net.Core.LevelEvaluator"&amp;gt;
&amp;#160;
&amp;lt;threshold value="ERROR"/&amp;gt;
&amp;#160;
evaluator&amp;gt;
&amp;#160;
&amp;#160;
&amp;lt;parameter&amp;gt;
&amp;#160;
&amp;lt;parameterName value="@log_date"/&amp;gt;
&amp;#160;
&amp;lt;dbType value="DateTime"/&amp;gt;
&amp;#160;
&amp;lt;layout type="log4net.Layout.RawTimeStampLayout"/&amp;gt;
&amp;#160;
parameter&amp;gt;
&amp;#160;
&amp;lt;parameter&amp;gt;
&amp;#160;
&amp;lt;parameterName value="@thread"/&amp;gt;
&amp;#160;
&amp;lt;dbType value="String"/&amp;gt;
&amp;#160;
&amp;lt;size value="255"/&amp;gt;
&amp;#160;
&amp;lt;layout type="log4net.Layout.PatternLayout"&amp;gt;
&amp;#160;
&amp;lt;conversionPattern value="%thread"/&amp;gt;
&amp;#160;
layout&amp;gt;
&amp;#160;
parameter&amp;gt;
&amp;#160;
&amp;lt;parameter&amp;gt;
&amp;#160;
&amp;lt;parameterName value="@log_level"/&amp;gt;
&amp;#160;
&amp;lt;dbType value="String"/&amp;gt;
&amp;#160;
&amp;lt;size value="50"/&amp;gt;
&amp;#160;
&amp;lt;layout type="log4net.Layout.PatternLayout"&amp;gt;
&amp;#160;
&amp;lt;conversionPattern value="%level"/&amp;gt;
&amp;#160;
layout&amp;gt;
&amp;#160;
parameter&amp;gt;
&amp;#160;
&amp;lt;parameter&amp;gt;
&amp;#160;
&amp;lt;parameterName value="@logger"/&amp;gt;
&amp;#160;
&amp;lt;dbType value="String"/&amp;gt;
&amp;#160;
&amp;lt;size value="255"/&amp;gt;
&amp;#160;
&amp;lt;layout type="log4net.Layout.PatternLayout"&amp;gt;
&amp;#160;
&amp;lt;conversionPattern value="%logger"/&amp;gt;
&amp;#160;
layout&amp;gt;
&amp;#160;
parameter&amp;gt;
&amp;#160;
&amp;lt;parameter&amp;gt;
&amp;#160;
&amp;lt;parameterName value="@message"/&amp;gt;
&amp;#160;
&amp;lt;dbType value="String"/&amp;gt;
&amp;#160;
&amp;lt;size value="4000"/&amp;gt;
&amp;#160;
&amp;lt;layout type="log4net.Layout.PatternLayout"&amp;gt;
&amp;#160;
&amp;lt;conversionPattern value="%message"/&amp;gt;
&amp;#160;
layout&amp;gt;
&amp;#160;
parameter&amp;gt;
&amp;#160;
&amp;lt;parameter&amp;gt;
&amp;#160;
&amp;lt;parameterName value="@exception"/&amp;gt;
&amp;#160;
&amp;lt;dbType value="String"/&amp;gt;
&amp;#160;
&amp;lt;size value="2000"/&amp;gt;
&amp;#160;
&amp;lt;layout type="log4net.Layout.ExceptionLayout"/&amp;gt;
&amp;#160;
parameter&amp;gt;
&amp;#160;
appender&amp;gt;
&amp;#160;
&amp;#160;
&amp;lt;appender name="FileAppender" type="log4net.Appender.FileAppender"&amp;gt;
&amp;#160;
&amp;lt;file value="L4NTest.Log.Txt"/&amp;gt;
&amp;#160;
&amp;lt;appendToFile value="true"/&amp;gt;
&amp;#160;
&amp;lt;layout type="log4net.Layout.PatternLayout"&amp;gt;
&amp;#160;
&amp;lt;conversionPattern value="%date [%thread] %-5level %logger [%ndc] - %message%newline"/&amp;gt;
&amp;#160;
layout&amp;gt;
&amp;#160;
appender&amp;gt;
&amp;#160;
&amp;#160;
&amp;lt;root&amp;gt;
&amp;#160;
&amp;lt;level value="ALL"/&amp;gt;
&amp;#160;
&amp;lt;appender-ref ref="AdoNetAppender"/&amp;gt;
&amp;#160;
&amp;lt;appender-ref ref="FileAppender"/&amp;gt;
&amp;#160;
root&amp;gt;
&amp;#160;
&amp;#160;
log4net&amp;gt;
&amp;#160;
&amp;#160;
configuration&amp;gt;
&amp;#160;
When running the program, the FileAppender wrote these log rows to the log file:
&amp;#160;
2005-11-09 13:19:47,906 [4988] DEBUG L4NTest.Program [(null)] - Log message no: 1 
&amp;#160;
2005-11-09 13:19:48,000 [4988] DEBUG L4NTest.Program [(null)] - Log message no: 2 
&amp;#160;
2005-11-09 13:19:48,000 [4988] DEBUG L4NTest.Program [(null)] - Log message no: 3 
&amp;#160;
2005-11-09 13:19:48,000 [4988] DEBUG L4NTest.Program [(null)] - Log message no: 4 
&amp;#160;
2005-11-09 13:19:48,000 [4988] DEBUG L4NTest.Program [(null)] - Log message no: 5 
&amp;#160;
2005-11-09 13:19:48,000 [4988] DEBUG L4NTest.Program [(null)] - Log message no: 6 
&amp;#160;
2005-11-09 13:19:48,000 [4988] DEBUG L4NTest.Program [(null)] - Log message no: 7 
&amp;#160;
2005-11-09 13:19:48,015 [4988] DEBUG L4NTest.Program [(null)] - Log message no: 8 
&amp;#160;
2005-11-09 13:19:48,015 [4988] DEBUG L4NTest.Program [(null)] - Log message no: 9 
&amp;#160;
2005-11-09 13:19:48,015 [4988] DEBUG L4NTest.Program [(null)] - Log message no: 10 
&amp;#160;
2005-11-09 13:19:48,015 [4988] DEBUG L4NTest.Program [(null)] - Log message no: 11 
&amp;#160;
2005-11-09 13:19:48,015 [4988] DEBUG L4NTest.Program [(null)] - Log message no: 12 
&amp;#160;
2005-11-09 13:19:48,015 [4988] DEBUG L4NTest.Program [(null)] - Log message no: 13 
&amp;#160;
2005-11-09 13:19:48,031 [4988] DEBUG L4NTest.Program [(null)] - Log message no: 14 
&amp;#160;
2005-11-09 13:19:48,031 [4988] DEBUG L4NTest.Program [(null)] - Log message no: 15 
&amp;#160;
2005-11-09 13:19:48,031 [4988] DEBUG L4NTest.Program [(null)] - Log message no: 16 
&amp;#160;
2005-11-09 13:19:48,031 [4988] DEBUG L4NTest.Program [(null)] - Log message no: 17 
&amp;#160;
2005-11-09 13:19:48,031 [4988] DEBUG L4NTest.Program [(null)] - Log message no: 18 
&amp;#160;
2005-11-09 13:19:48,031 [4988] DEBUG L4NTest.Program [(null)] - Log message no: 19 
&amp;#160;
2005-11-09 13:19:48,031 [4988] DEBUG L4NTest.Program [(null)] - Log message no: 20 
&amp;#160;
2005-11-09 13:19:48,046 [4988] ERROR L4NTest.Program [(null)] - Error message no: 21 
&amp;#160;
2005-11-09 13:19:48,093 [4988] DEBUG L4NTest.Program [(null)] - Log message no: 22 
&amp;#160;
2005-11-09 13:19:48,093 [4988] DEBUG L4NTest.Program [(null)] - Log message no: 23 
&amp;#160;
2005-11-09 13:19:48,093 [4988] DEBUG L4NTest.Program [(null)] - Log message no: 24 
&amp;#160;
2005-11-09 13:19:48,093 [4988] DEBUG L4NTest.Program [(null)] - Log message no: 25 
&amp;#160;
2005-11-09 13:19:48,093 [4988] DEBUG L4NTest.Program [(null)] - Log message no: 26 
&amp;#160;
2005-11-09 13:19:48,093 [4988] DEBUG L4NTest.Program [(null)] - Log message no: 27 
&amp;#160;
2005-11-09 13:19:48,093 [4988] DEBUG L4NTest.Program [(null)] - Log message no: 28 
&amp;#160;
2005-11-09 13:19:48,093 [4988] DEBUG L4NTest.Program [(null)] - Log message no: 29 
&amp;#160;
2005-11-09 13:19:48,093 [4988] DEBUG L4NTest.Program [(null)] - Log message no: 30 
&amp;#160;
2005-11-09 13:19:48,093 [4988] DEBUG L4NTest.Program [(null)] - Log message no: 31
&amp;#160;
&amp;#160;
The AdoNetAppender wrote these log rows to the database: 
&amp;#160;
&amp;#160;

    
        
            
            Date
            
            
            Level
            
            
            Logger
            
            
            Message
            
        
        
            
            2005-11-09 13:19:48.017
            
            
            DEBUG
            
            
            L4NTest.Program
            
            
            Log message no: 12
            
        
        
            
            2005-11-09 13:19:48.017
            
            
            DEBUG
            
            
            L4NTest.Program
            
            
            Log message no: 13
            
        
        
            
            2005-11-09 13:19:48.030
            
            
            DEBUG
            
            
            L4NTest.Program
            
            
            Log message no: 14
            
        
        
            
            2005-11-09 13:19:48.030
            
            
            DEBUG
            
            
            L4NTest.Program
            
            
            Log message no: 15
            
        
        
            
            2005-11-09 13:19:48.030
            
            
            DEBUG
            
            
            L4NTest.Program
            
            
            Log message no: 16
            
        
        
            
            2005-11-09 13:19:48.030
            
            
            DEBUG
            
            
            L4NTest.Program
            
            
            Log message no: 17
            
        
        
            
            2005-11-09 13:19:48.030
            
            
            DEBUG
            
            
            L4NTest.Program
            
            
            Log message no: 18
            
        
        
            
            2005-11-09 13:19:48.030
            
            
            DEBUG
            
            
            L4NTest.Program
            
            
            Log message no: 19
            
        
        
            
            2005-11-09 13:19:48.030
            
            
            DEBUG
            
            
            L4NTest.Program
            
            
            Log message no: 20
            
        
        
            
            2005-11-09 13:19:48.047
            
            
            ERROR
            
            
            L4NTest.Program
            
            
            Error message no: 21
            
        
    

&amp;#160;
As you can see, the AdoNetAppender has logged the errormessage, and the 9 rows before the error message, in contrast to the FileAppender which logs all messages. 
&amp;#160;
&amp;#160;
</description><dc:creator>Georg Jansen</dc:creator><pubDate>Sun, 13 Nov 2005 15:11:00 GMT</pubDate><guid isPermaLink="false">f1397696-738c-4295-afcd-943feb885714:23</guid></item><item><comments>http://www.l4ndash.com/News/tabid/69/ctl/ArticleView/mid/413/articleId/3/Fast-track-to-Log4Net-database-logging.aspx#Comments</comments><slash:comments>4</slash:comments><wfw:commentRss>http://www.l4ndash.com/DesktopModules/DnnForge%20-%20NewsArticles/RssComments.aspx?TabID=69&amp;ModuleID=413&amp;ArticleID=3</wfw:commentRss><trackback:ping>http://www.l4ndash.com/DesktopModules/DnnForge%20-%20NewsArticles/Tracking/Trackback.aspx?ArticleID=3&amp;PortalID=0&amp;TabID=69</trackback:ping><title>Fast track to Log4Net database logging</title><link>http://www.l4ndash.com/News/tabid/69/ctl/ArticleView/mid/413/articleId/3/Fast-track-to-Log4Net-database-logging.aspx</link><description>In this article I will walk you trough the steps necessary to install, configure and getting started with Log4net, and writing log rows to Microsoft Sql Server using the AdoNetAppender. </description><dc:creator>Georg Jansen</dc:creator><pubDate>Sat, 15 Oct 2005 18:11:00 GMT</pubDate><guid isPermaLink="false">f1397696-738c-4295-afcd-943feb885714:3</guid></item><item><comments>http://www.l4ndash.com/News/tabid/69/ctl/ArticleView/mid/413/articleId/1/Tracking-user-sessions-in-ASPNET-applications-using-Log4Net.aspx#Comments</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.l4ndash.com/DesktopModules/DnnForge%20-%20NewsArticles/RssComments.aspx?TabID=69&amp;ModuleID=413&amp;ArticleID=1</wfw:commentRss><trackback:ping>http://www.l4ndash.com/DesktopModules/DnnForge%20-%20NewsArticles/Tracking/Trackback.aspx?ArticleID=1&amp;PortalID=0&amp;TabID=69</trackback:ping><title>Tracking user sessions in ASP.NET applications using Log4Net.</title><link>http://www.l4ndash.com/News/tabid/69/ctl/ArticleView/mid/413/articleId/1/Tracking-user-sessions-in-ASPNET-applications-using-Log4Net.aspx</link><description>When debugging web applications, with several clients making request at the (almost) same time, we need some way of distinguish and identify the different requests and sessions. </description><dc:creator>Georg Jansen</dc:creator><pubDate>Sat, 08 Oct 2005 21:27:00 GMT</pubDate><guid isPermaLink="false">f1397696-738c-4295-afcd-943feb885714:1</guid></item><item><comments>http://www.l4ndash.com/News/tabid/69/ctl/ArticleView/mid/413/articleId/5/Using-Log4Net-to-log-from-Database-Stored-procedures.aspx#Comments</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.l4ndash.com/DesktopModules/DnnForge%20-%20NewsArticles/RssComments.aspx?TabID=69&amp;ModuleID=413&amp;ArticleID=5</wfw:commentRss><trackback:ping>http://www.l4ndash.com/DesktopModules/DnnForge%20-%20NewsArticles/Tracking/Trackback.aspx?ArticleID=5&amp;PortalID=0&amp;TabID=69</trackback:ping><title> Using Log4Net to log from Database Stored procedures. </title><link>http://www.l4ndash.com/News/tabid/69/ctl/ArticleView/mid/413/articleId/5/Using-Log4Net-to-log-from-Database-Stored-procedures.aspx</link><description>One of the advantages of storing Log4Net log in a database using the AdoNetAppender, is the possibility to store log events from Stored Procedures in the same log.</description><dc:creator>Georg Jansen</dc:creator><pubDate>Wed, 28 Sep 2005 15:19:00 GMT</pubDate><guid isPermaLink="false">f1397696-738c-4295-afcd-943feb885714:5</guid></item><item><comments>http://www.l4ndash.com/News/tabid/69/ctl/ArticleView/mid/413/articleId/2/Why-use-database-as-the-preferred-storage-of-logs.aspx#Comments</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.l4ndash.com/DesktopModules/DnnForge%20-%20NewsArticles/RssComments.aspx?TabID=69&amp;ModuleID=413&amp;ArticleID=2</wfw:commentRss><trackback:ping>http://www.l4ndash.com/DesktopModules/DnnForge%20-%20NewsArticles/Tracking/Trackback.aspx?ArticleID=2&amp;PortalID=0&amp;TabID=69</trackback:ping><title>Why use database as the preferred storage of logs.</title><link>http://www.l4ndash.com/News/tabid/69/ctl/ArticleView/mid/413/articleId/2/Why-use-database-as-the-preferred-storage-of-logs.aspx</link><description>Log4Net gives us a collection of log appenders making it possible to choose where we writs logs. One of the possible appenders is the AdoNetAppender which write log-rows to a database. </description><dc:creator>Georg Jansen</dc:creator><pubDate>Tue, 27 Sep 2005 18:06:00 GMT</pubDate><guid isPermaLink="false">f1397696-738c-4295-afcd-943feb885714:2</guid></item></channel></rss>