<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>Simple Logging Façade</title><link>http://slf.codeplex.com/project/feeds/rss</link><description>This logging fa&amp;#231;ade provides you with a common interface that decouples the logging framework of your choice from your code, thus minimizing dependencies on said facility.</description><item><title>New Post: thread safety</title><link>http://slf.codeplex.com/discussions/443151</link><description>&lt;div style="line-height: normal;"&gt;Is SLF thread-safe? If not, how does one use it safely from multiple threads potentially simultaneously?&lt;br /&gt;
&lt;/div&gt;</description><author>PerrySharePoint</author><pubDate>Thu, 09 May 2013 18:10:31 GMT</pubDate><guid isPermaLink="false">New Post: thread safety 20130509061031P</guid></item><item><title>New Post: How about .NET Framework support</title><link>http://slf.codeplex.com/discussions/440913</link><description>&lt;div style="line-height: normal;"&gt;Um, hello?&lt;br /&gt;
&lt;br /&gt;
For a .NET facade, it's pretty strange that you seem to support a bunch of third party logging frameworks, but not the .NET Framework itself, i.e. System.Diagnostics, TraceSource, etc.&lt;br /&gt;
&lt;/div&gt;</description><author>sgryphon</author><pubDate>Fri, 19 Apr 2013 14:03:00 GMT</pubDate><guid isPermaLink="false">New Post: How about .NET Framework support 20130419020300P</guid></item><item><title>New Post: Releasing File Lock</title><link>http://slf.codeplex.com/discussions/433324</link><description>&lt;div style="line-height: normal;"&gt;Hello everyone,&lt;br /&gt;
&lt;br /&gt;
I have a program which uses SLF for logging. This program runs 24/7 and I would like to upload the log files to a remote server every night for later review.&lt;br /&gt;
&lt;br /&gt;
My question is, how do I release the file lock for the log without closing the program?&lt;br /&gt;
&lt;br /&gt;
I was hoping to suspend logging, upload the logs, either delete the log file or erase the contents, and then resume logging.&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;ILogger logger = LoggerService.GetLogger(typeof(TaskScheduler).FullName);

// Other initialization here

foreach (var task in managedTasks.OrderBy(t =&amp;gt; t.Priority))
{
    if (task.NextRunTime &amp;lt;= DateTime.Now)
    {
        dataManager.CurrentStatus = AppStatus.Running;
        if (task.Name == &amp;quot;Log Sender&amp;quot;)
        {
             logger = null;
        }

        // Run the task

        if (task.Name == &amp;quot;Log Sender&amp;quot;)
            logger = LoggerService.GetLogger(typeof(TaskScheduler).FullName);

        dataManager.CurrentStatus = AppStatus.Idle;
    }
}&lt;/code&gt;&lt;/pre&gt;

Currently, when I do this, I'm still getting an IOException because the file is still locked by the Task Scheduler.&lt;br /&gt;
&lt;br /&gt;
Any ideas are appreciated.&lt;br /&gt;
&lt;br /&gt;
Ben&lt;br /&gt;
&lt;/div&gt;</description><author>benhelite</author><pubDate>Fri, 15 Feb 2013 22:18:37 GMT</pubDate><guid isPermaLink="false">New Post: Releasing File Lock 20130215101837P</guid></item><item><title>Source code checked in, #99885</title><link>http://slf.codeplex.com/SourceControl/changeset/changes/99885</link><description>Upgrade&amp;#58; New Version of LabDefaultTemplate.xaml. To upgrade your build definitions, please visit the following link&amp;#58; http&amp;#58;&amp;#47;&amp;#47;go.microsoft.com&amp;#47;fwlink&amp;#47;&amp;#63;LinkId&amp;#61;254563</description><author>Project Collection Service Accounts</author><pubDate>Mon, 01 Oct 2012 21:24:31 GMT</pubDate><guid isPermaLink="false">Source code checked in, #99885 20121001092431P</guid></item><item><title>Source code checked in, #99884</title><link>http://slf.codeplex.com/SourceControl/changeset/changes/99884</link><description>Checked in by server upgrade</description><author>Project Collection Service Accounts</author><pubDate>Mon, 01 Oct 2012 21:16:08 GMT</pubDate><guid isPermaLink="false">Source code checked in, #99884 20121001091608P</guid></item><item><title>Commented Issue: Create NuGet package for SLF [31452]</title><link>http://slf.codeplex.com/workitem/31452</link><description>Would be great to have a NuGet package so that the SLF.dll wouldn&amp;#39;t have to be embedded in libraries that are distributed as NuGet packages.&lt;br /&gt;Comments: ** Comment from web user: ipashchuk ** &lt;p&gt;I&amp;#39;m attaching a NuGet package for SLF Core.  I would be happy to upload it to the official NuGet repository if you guys are busy.&lt;/p&gt;</description><author>ipashchuk</author><pubDate>Wed, 14 Sep 2011 18:15:03 GMT</pubDate><guid isPermaLink="false">Commented Issue: Create NuGet package for SLF [31452] 20110914061503P</guid></item><item><title>Commented Issue: Create NuGet package for SLF [31452]</title><link>http://slf.codeplex.com/workitem/31452</link><description>Would be great to have a NuGet package so that the SLF.dll wouldn&amp;#39;t have to be embedded in libraries that are distributed as NuGet packages.&lt;br /&gt;Comments: ** Comment from web user: ipashchuk ** &lt;p&gt;It would probably be best to create NuGet packages as follows&amp;#58;&lt;br /&gt;- SimpleLoggingFacade.Core &amp;#40;just the SLF binary&amp;#41;&lt;br /&gt;- SimpleLoggingFacade.Log4Net&lt;br /&gt;- SimpleLoggingFacade.NLog&lt;br /&gt;- SimpleLoggingFacade.EntLibLogging&lt;br /&gt;- SimpleLoggingFacade.BitFactory&lt;/p&gt;</description><author>ipashchuk</author><pubDate>Tue, 13 Sep 2011 14:08:58 GMT</pubDate><guid isPermaLink="false">Commented Issue: Create NuGet package for SLF [31452] 20110913020858P</guid></item><item><title>Created Issue: Create NuGet package for SLF [31452]</title><link>http://slf.codeplex.com/workitem/31452</link><description>Would be great to have a NuGet package so that the SLF.dll wouldn&amp;#39;t have to be embedded in libraries that are distributed as NuGet packages.&lt;br /&gt;</description><author>ipashchuk</author><pubDate>Tue, 13 Sep 2011 13:59:54 GMT</pubDate><guid isPermaLink="false">Created Issue: Create NuGet package for SLF [31452] 20110913015954P</guid></item><item><title>Reviewed: SLF 1.0.0 December 2009 (Sep 13, 2011)</title><link>http://slf.codeplex.com/releases/view/36733#ReviewBy-ipashchuk</link><description>Rated 4 Stars &amp;#40;out of 5&amp;#41; - Great library.  Would be nice to have a NuGet package...</description><author>ipashchuk</author><pubDate>Tue, 13 Sep 2011 13:56:23 GMT</pubDate><guid isPermaLink="false">Reviewed: SLF 1.0.0 December 2009 (Sep 13, 2011) 20110913015623P</guid></item><item><title>New Post: Factory for BitLaboratory (Object Guy's) Logging Framework?</title><link>http://slf.codeplex.com/discussions/211851</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;This is an old message, but I have the exact same issue...&lt;/p&gt;
&lt;p&gt;BitFactory can be configured declaratively, and SLF can be configured declaratively, but it does not seem they can be configured declaratively together without a factory for creating BitFactoryLogger objects...&lt;/p&gt;
&lt;p&gt;Unless I am missing something as well.&lt;/p&gt;&lt;/div&gt;</description><author>benmcclure</author><pubDate>Sun, 27 Mar 2011 07:26:02 GMT</pubDate><guid isPermaLink="false">New Post: Factory for BitLaboratory (Object Guy's) Logging Framework? 20110327072602A</guid></item><item><title>New Post: callsite is lost through NLogFacade</title><link>http://slf.codeplex.com/discussions/210075</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Have this been fixed for NLog? Instead of importing the NLogFacade dll, I copied the 2 files into my project. Would this prevent callsite from working?&lt;/p&gt;
&lt;p&gt;I set up logger in my global.ascx file as follows:&lt;/p&gt;
&lt;p&gt;
&lt;div style="color: black; background-color: white;"&gt;
&lt;pre&gt;
  &lt;span style="color: green;"&gt;//Setup logger&lt;/span&gt;
  LoggerService.FactoryResolver = &lt;span style="color: blue;"&gt;new&lt;/span&gt; SimpleFactoryResolver(&lt;span style="color: blue;"&gt;new&lt;/span&gt; NLogLoggerFactory());
&lt;/pre&gt;
&lt;pre&gt;&lt;br /&gt;&lt;/pre&gt;
&lt;pre&gt;Later down in my app, I log like this:&lt;/pre&gt;
&lt;pre&gt;&lt;div style="color: black; background-color: white;"&gt;&lt;pre&gt;ILogger logger = LoggerService.GetLogger();
logger.Error(&lt;span style="color: #a31515;"&gt;"Exception: {0}"&lt;/span&gt;, ex.Source);
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;&lt;/pre&gt;
&lt;pre&gt;My NLog.onfig:&lt;/pre&gt;
&lt;pre&gt;&lt;div style="color: black; background-color: white;"&gt;&lt;pre&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;nlog&lt;/span&gt; &lt;span style="color: red;"&gt;xmlns&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;&lt;span style="color: blue;"&gt;http://www.nlog-project.org/schemas/NLog.xsd&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;
      &lt;span style="color: red;"&gt;xmlns:xsi&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;&lt;span style="color: blue;"&gt;http://www.w3.org/2001/XMLSchema-instance&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;

  &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;targets&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;target&lt;/span&gt; &lt;span style="color: red;"&gt;name&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;&lt;span style="color: blue;"&gt;file&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt; &lt;span style="color: red;"&gt;xsi:type&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;&lt;span style="color: blue;"&gt;AsyncWrapper&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt; &lt;span style="color: red;"&gt;queueLimit&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;&lt;span style="color: blue;"&gt;5000&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt; &lt;span style="color: red;"&gt;overflowAction&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;&lt;span style="color: blue;"&gt;Discard&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;target&lt;/span&gt; &lt;span style="color: red;"&gt;name&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;&lt;span style="color: blue;"&gt;FileError&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;
            &lt;span style="color: red;"&gt;xsi:type&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;&lt;span style="color: blue;"&gt;File&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;
            &lt;span style="color: red;"&gt;fileName&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;&lt;span style="color: blue;"&gt;${basedir}/App_Data/Logs/errors.txt&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;
            &lt;span style="color: red;"&gt;archiveFileName&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;&lt;span style="color: blue;"&gt;${basedir}/App_Data/Archives/log.{#####}.txt&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;
            &lt;span style="color: red;"&gt;archiveAboveSize&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;&lt;span style="color: blue;"&gt;10240&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;
            &lt;span style="color: red;"&gt;archiveNumbering&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;&lt;span style="color: blue;"&gt;Sequence&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;
            &lt;span style="color: red;"&gt;concurrentWrites&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;&lt;span style="color: blue;"&gt;true&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;
            &lt;span style="color: red;"&gt;keepFileOpen&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;&lt;span style="color: blue;"&gt;false&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;
            &lt;span style="color: red;"&gt;encoding&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;&lt;span style="color: blue;"&gt;iso-8859-2&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;
            &lt;span style="color: red;"&gt;layout&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;&lt;span style="color: blue;"&gt;${longdate}|${callsite:className=true:fileName=false:includeSourcePath=false:methodName=true}|${message}&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;&lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;target&lt;/span&gt; &lt;span style="color: red;"&gt;name&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;&lt;span style="color: blue;"&gt;FileInfo&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt; &lt;span style="color: red;"&gt;xsi:type&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;&lt;span style="color: blue;"&gt;File&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt; &lt;span style="color: red;"&gt;fileName&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;&lt;span style="color: blue;"&gt;${basedir}/App_Data/Logs/info.txt&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;&lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515;"&gt;target&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515;"&gt;targets&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;rules&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;logger&lt;/span&gt; &lt;span style="color: red;"&gt;name&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;&lt;span style="color: blue;"&gt;*&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt; &lt;span style="color: red;"&gt;level&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;&lt;span style="color: blue;"&gt;Error&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt; &lt;span style="color: red;"&gt;writeTo&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;&lt;span style="color: blue;"&gt;FileError&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;&lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;logger&lt;/span&gt; &lt;span style="color: red;"&gt;name&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;&lt;span style="color: blue;"&gt;*&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt; &lt;span style="color: red;"&gt;level&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;&lt;span style="color: blue;"&gt;Info&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt; &lt;span style="color: red;"&gt;writeTo&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;&lt;span style="color: blue;"&gt;FileInfo&lt;/span&gt;&lt;span style="color: black;"&gt;"&lt;/span&gt;&lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515;"&gt;rules&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515;"&gt;nlog&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/p&gt;&lt;/div&gt;</description><author>Mixmasterxp</author><pubDate>Wed, 16 Feb 2011 04:11:53 GMT</pubDate><guid isPermaLink="false">New Post: callsite is lost through NLogFacade 20110216041153A</guid></item><item><title>New Post: Using NLog.config</title><link>http://slf.codeplex.com/discussions/245889</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Stupid question lol. Delete pls.&lt;/p&gt;&lt;/div&gt;</description><author>Mixmasterxp</author><pubDate>Mon, 14 Feb 2011 00:56:19 GMT</pubDate><guid isPermaLink="false">New Post: Using NLog.config 20110214125619A</guid></item><item><title>New Post: Reload configuration for configuration file on fly</title><link>http://slf.codeplex.com/Thread/View.aspx?ThreadId=233935</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;You might also consider using &lt;a href="http://netcommon.sourceforge.net/"&gt;Common.Logging&lt;/a&gt;.&amp;nbsp; It supports (via the config file) telling log4net to configure and watch.&amp;nbsp; It also supports putting the log4net configuration in the app.config file
 OR in a separate config file.&lt;/p&gt;
&lt;/div&gt;</description><author>wageoghe</author><pubDate>Wed, 10 Nov 2010 22:23:44 GMT</pubDate><guid isPermaLink="false">New Post: Reload configuration for configuration file on fly 20101110102344P</guid></item><item><title>New Post: Reload configuration for configuration file on fly</title><link>http://slf.codeplex.com/Thread/View.aspx?ThreadId=233935</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;I am looking at using SLF and log4net as the logging framework on one of my projects. I am setting up the SLF and log4net configuration in my app,config file and everything loads and logs as excepted. However one of my requirements is to be able to change
 the log4net properties from my application and have the logger to use the new settings without reloading the application. In the past I have used the log4net xmlconfiguration configandwatch() method.&lt;/p&gt;
&lt;p&gt;Is there a way to handle this through the SLF framework.&lt;/p&gt;
&lt;/div&gt;</description><author>alfrye</author><pubDate>Mon, 08 Nov 2010 21:31:36 GMT</pubDate><guid isPermaLink="false">New Post: Reload configuration for configuration file on fly 20101108093136P</guid></item><item><title>New Post: SLF with Windows Phone?</title><link>http://slf.codeplex.com/Thread/View.aspx?ThreadId=229571</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Is SLF (or a future version) usable with Windows Phone 7?&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Vikram&lt;/p&gt;&lt;/div&gt;</description><author>BeauGeek</author><pubDate>Mon, 04 Oct 2010 18:23:38 GMT</pubDate><guid isPermaLink="false">New Post: SLF with Windows Phone? 20101004062338P</guid></item><item><title>Commented Task: Explore the impact of SLF on nlog / log4net stacktraces [25524]</title><link>http://slf.codeplex.com/workitem/25524</link><description>Both NLog and log4net have formatters that output information relating to the call-stack. Currently SLF will obscure this.&lt;br /&gt;&lt;br /&gt;What can we do&amp;#63;&lt;br /&gt;&lt;br /&gt;The only solution I can thin of, which is a bit nasty, is to create our own builds of NLog and log4net that skip stack frames.&lt;br /&gt;Comments: ** Comment from web user: wageoghe ** &lt;p&gt;I have added a comment in the &amp;#34;callsite is lost through the NLogFacade&amp;#34; discussion thread about how to fix this problem for log4net.  You can look there for more info, or I will also include some sample code here&amp;#58;&lt;/p&gt;&lt;p&gt;&amp;#47;&amp;#47;&amp;#47; &amp;#60;summary&amp;#62;&lt;br /&gt;&amp;#47;&amp;#47;&amp;#47; Sends the message to the underlying log4net system.&lt;br /&gt;&amp;#47;&amp;#47;&amp;#47; &amp;#60;&amp;#47;summary&amp;#62;&lt;br /&gt;&amp;#47;&amp;#47;&amp;#47; &amp;#60;param name&amp;#61;&amp;#34;logLevel&amp;#34;&amp;#62;the level of this log event.&amp;#60;&amp;#47;param&amp;#62;&lt;br /&gt;&amp;#47;&amp;#47;&amp;#47; &amp;#60;param name&amp;#61;&amp;#34;message&amp;#34;&amp;#62;the message to log&amp;#60;&amp;#47;param&amp;#62;&lt;br /&gt;&amp;#47;&amp;#47;&amp;#47; &amp;#60;param name&amp;#61;&amp;#34;exception&amp;#34;&amp;#62;the exception to log &amp;#40;may be null&amp;#41;&amp;#60;&amp;#47;param&amp;#62;&lt;br /&gt;protected override void WriteInternal&amp;#40;LogLevel logLevel, object message, Exception exception&amp;#41;&lt;br /&gt;&amp;#123;&lt;br /&gt;    Level level &amp;#61; GetLevel&amp;#40;logLevel&amp;#41;&amp;#59;&lt;br /&gt;    _logger.Log&amp;#40;declaringType, level, message, exception&amp;#41;&amp;#59;&lt;br /&gt;&amp;#125;&lt;/p&gt;&lt;p&gt;By using the log4net logger&amp;#39;s &amp;#34;Log&amp;#34; method and passing the type of the wrapping logger, log4net knows which DeclaringType in the call stack is the entry point for the logging call.  One step up from that should be in the actual user code.&lt;/p&gt;</description><author>wageoghe</author><pubDate>Fri, 10 Sep 2010 18:31:18 GMT</pubDate><guid isPermaLink="false">Commented Task: Explore the impact of SLF on nlog / log4net stacktraces [25524] 20100910063118P</guid></item><item><title>New Post: callsite is lost through NLogFacade</title><link>http://slf.codeplex.com/Thread/View.aspx?ThreadId=210075</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Building on my last comment, here is some code from &lt;a href="http://netcommon.sourceforge.net/"&gt;Common.Logging&lt;/a&gt; that I think is showing the correct technique for preserving the code location.&amp;nbsp; Note that declaringType is stored in the wrapping logger (in this case Common.Logging's Log4netLogger) and it is the type of their Log4netLogger (as compared to the use of the logger's base class that is used to make NLog's code location work correctly).&lt;/p&gt;
&lt;div style="color:black;background-color:white"&gt;
&lt;pre&gt;        &lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span style="color:gray"&gt;///&lt;/span&gt;&lt;span style="color:green"&gt; Sends the message to the underlying log4net system.&lt;/span&gt;
        &lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;
        &lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;param name=&amp;quot;logLevel&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color:green"&gt;the level of this log event.&amp;lt;/param&amp;gt;&lt;/span&gt;
        &lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;param name=&amp;quot;message&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color:green"&gt;the message to log&amp;lt;/param&amp;gt;&lt;/span&gt;
        &lt;span style="color:gray"&gt;///&lt;/span&gt; &lt;span style="color:gray"&gt;&amp;lt;param name=&amp;quot;exception&amp;quot;&amp;gt;&lt;/span&gt;&lt;span style="color:green"&gt;the exception to log (may be null)&amp;lt;/param&amp;gt;&lt;/span&gt;
        &lt;span style="color:blue"&gt;protected&lt;/span&gt; &lt;span style="color:blue"&gt;override&lt;/span&gt; &lt;span style="color:blue"&gt;void&lt;/span&gt; WriteInternal(LogLevel logLevel, &lt;span style="color:blue"&gt;object&lt;/span&gt; message, Exception exception)
        {
            Level level = GetLevel(logLevel);
            _logger.Log(declaringType, level, message, exception);
        }

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description><author>wageoghe</author><pubDate>Fri, 10 Sep 2010 18:19:05 GMT</pubDate><guid isPermaLink="false">New Post: callsite is lost through NLogFacade 20100910061905P</guid></item><item><title>New Post: Adding unique IDs to log messages</title><link>http://slf.codeplex.com/Thread/View.aspx?ThreadId=77592</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;You can go to the log4net source repository here to find a log4net extension that shows how to extend log4net to include an event id parameter.&amp;nbsp; Essentially they define an interface that is the same as (or similar to)&amp;nbsp;ILog, with an additional eventId parameter.&amp;nbsp; The implementation wraps a regular log4net logger.&amp;nbsp; Each logging call creates a log4net LoggingEvent structure/class and adds an &amp;quot;EventID&amp;quot; property to the LoggingEvent's Properties dictionary.&amp;nbsp; It then uses the regular log4net logger's Log method (which takes a LoggingEvent sturcture/class).&amp;nbsp; To get the EventID to show up in the&amp;nbsp; output, I guess you would just have to add the appropriate properties reference in the format string.&lt;/p&gt;
&lt;p&gt;If SLF wanted to support the ability to log &amp;quot;event id&amp;quot; natively, one approach might be to declare an interface that is parallel to SLF.ILogger.&amp;nbsp; It might be SLF.IEventIdLogger.&amp;nbsp; It would have the same parameters as ILogger, with the addition of an event id, maybe as the first parameter like log4net did.&amp;nbsp; Now, if someone wants to log event ids, they would request IEventIdLoggers (maybe you would need a parallel LogManager like log4net implemented in their extension) and log away.&amp;nbsp; A similar technique could probably be used for NLog (put the EventId in the appropriate NLog context dictionary).&lt;/p&gt;&lt;/div&gt;</description><author>wageoghe</author><pubDate>Fri, 10 Sep 2010 18:11:13 GMT</pubDate><guid isPermaLink="false">New Post: Adding unique IDs to log messages 20100910061113P</guid></item><item><title>New Post: Expose logging context</title><link>http://slf.codeplex.com/Thread/View.aspx?ThreadId=226524</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Should slf &amp;quot;generically&amp;quot; expose the logging context (NDC, MDC, etc) of log4net and NLog?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For an example of a logging abstraction that does this, see the &lt;a title=log4net href="http://github.com/castleproject/Castle.Core/tree/master/src/Castle.Services.Logging.log4netIntegration/"&gt;log4net&lt;/a&gt;&amp;nbsp;and &lt;a title=NLog href="http://github.com/castleproject/Castle.Core/tree/master/src/Castle.Services.Logging.NLogIntegration/"&gt;NLog&lt;/a&gt; abstractions at the Castle project.&amp;nbsp; log4net and NLog loggers can be resolved as basic loggers (I think with an ILogger interface) or as &amp;quot;extended&amp;quot; loggers (IExtendedLogger).&amp;nbsp; From what I can tell, the extended logger interface exposes all of the &amp;quot;context&amp;quot; information (stacks and dictionaries) that can be exposed on log4net and NLog.&amp;nbsp; There is also a TraceSource based logger, but it is only exposed as ILogger.&amp;nbsp; I'm not sure what would happen if you tried to access the extended information on a TraceSource based logger, maybe an exception, maybe it just doesn't support an interface.&lt;/p&gt;
&lt;p&gt;Anyway, without exposing the logging context generically, one would have to resort to referencing the specific logging platform's LogManager to set the context, thus defeating the purpose of using the abstraction.&lt;/p&gt;
&lt;p&gt;Of course, there is the inherent conflict between limiting the facade to capabilities available in all logging platforms vs implementing/exposing capabilities that are available in some, but not all, logging platforms.&amp;nbsp;&lt;/p&gt;&lt;/div&gt;</description><author>wageoghe</author><pubDate>Wed, 08 Sep 2010 21:05:39 GMT</pubDate><guid isPermaLink="false">New Post: Expose logging context 20100908090539P</guid></item><item><title>New Post: using external config file with slf</title><link>http://slf.codeplex.com/Thread/View.aspx?ThreadId=225170</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Due to the length and complexity of some log config files, it would be usefull if we could store it in an external file and have some way to point SLF to load it from there instead of the app config file.&lt;/p&gt;&lt;/div&gt;</description><author>vmlf</author><pubDate>Sat, 28 Aug 2010 16:19:37 GMT</pubDate><guid isPermaLink="false">New Post: using external config file with slf 20100828041937P</guid></item></channel></rss>