title: Log4Net Logging of two different levels to two different appenders for the same logger
body: <p>We have two different asp.net applications with Log4net logging enabled.
  They both have the same version of Log4Net, 1.2.10.0.</p>
  
  <p>We have added the <code>log4net.Appender.AdoNetAppender</code> logger to both of them and want to log Info level to it for the root logger, but also want to log to the Error level for a root logger to a file appender.
  Our configuration is as follows;</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  
  &lt;log4net&gt;
      &lt;appender name="filelogAppender" type="log4net.Appender.RollingFileAppender" &gt;
          &lt;file value="..\logs\app.debug.log" /&gt;
          &lt;encoding value="utf-8" /&gt;
          &lt;staticLogFileName value="true" /&gt;
          &lt;datePattern value=".yyyyMMdd.'log'" /&gt;
          &lt;rollingStyle value="Composite" /&gt;
          &lt;lockingModel type="log4net.Appender.FileAppender+MinimalLock" /&gt;
          &lt;appendToFile value="true" /&gt;
          &lt;maximumFileSize value="1MB" /&gt;
          &lt;layout type="log4net.Layout.PatternLayout"&gt;
              &lt;conversionPattern value="%date [%3thread] %-5level %property{log4net:HostName} [%property{Revision}] %logger %message%n" /&gt;
          &lt;/layout&gt;
      &lt;/appender&gt;
      &lt;!--    
          use [DB]
          GO
          CREATE TABLE [dbo].[Log] (
              [Id] [int] IDENTITY (1, 1) NOT NULL,
              [Date] [datetime] NOT NULL,
              [Application][varchar] (255) NOT NULL,
              [Thread] [varchar] (255) NOT NULL,
              [Level] [varchar] (50) NOT NULL,
              [Logger] [varchar] (255) NOT NULL,
              [Server][varchar](255) NOT NULL,
              [Revision][varchar](50) NOT NULL,
              [Message] [varchar] (4000) NOT NULL,
              [Exception] [varchar] (2000) NULL
          )
      --&gt;
      &lt;appender name="dbLogAppender" type="log4net.Appender.AdoNetAppender" xdt:Transform="InsertBefore(/log4net/root)"&gt;
          &lt;bufferSize value="100" /&gt;
          &lt;connectionType value="System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /&gt;
          &lt;connectionString value="data source=sqlserver;initial catalog=DB;integrated security=false;persist security info=True;User ID=USER;Password=PASSWORD" /&gt;
          &lt;commandText value="INSERT INTO Log ([Date],[Application],[Thread],[Level],[Logger],[Server],[Revision],[Message],[Exception]) VALUES (@log_date,'WebApp1', @thread, @log_level, @logger, @server, @revision, @message, @exception)" /&gt;
          &lt;parameter&gt;
              &lt;parameterName value="@log_date" /&gt;
              &lt;dbType value="DateTime" /&gt;
              &lt;layout type="log4net.Layout.RawTimeStampLayout" /&gt;
          &lt;/parameter&gt;
          &lt;parameter&gt;
              &lt;parameterName value="@thread" /&gt;
              &lt;dbType value="String" /&gt;
              &lt;size value="255" /&gt;
              &lt;layout type="log4net.Layout.PatternLayout"&gt;
                  &lt;conversionPattern value="%thread" /&gt;
              &lt;/layout&gt;
          &lt;/parameter&gt;
          &lt;parameter&gt;
              &lt;parameterName value="@log_level" /&gt;
              &lt;dbType value="String" /&gt;
              &lt;size value="50" /&gt;
              &lt;layout type="log4net.Layout.PatternLayout"&gt;
                  &lt;conversionPattern value="%level" /&gt;
              &lt;/layout&gt;
          &lt;/parameter&gt;
          &lt;parameter&gt;
              &lt;parameterName value="@logger" /&gt;
              &lt;dbType value="String" /&gt;
              &lt;size value="255" /&gt;
              &lt;layout type="log4net.Layout.PatternLayout"&gt;
                  &lt;conversionPattern value="%logger" /&gt;
              &lt;/layout&gt;
          &lt;/parameter&gt;
          &lt;parameter&gt;
              &lt;parameterName value="@server" /&gt;
              &lt;dbType value="String" /&gt;
              &lt;size value="255" /&gt;
              &lt;layout type="log4net.Layout.PatternLayout"&gt;
                  &lt;conversionPattern value="%property{log4net:HostName}"/&gt;
              &lt;/layout&gt;
          &lt;/parameter&gt;
          &lt;parameter&gt;
              &lt;parameterName value="@revision" /&gt;
              &lt;dbType value="String" /&gt;
              &lt;size value="50" /&gt;
              &lt;layout type="log4net.Layout.PatternLayout"&gt;
                  &lt;conversionPattern value="%property{Revision}"/&gt;
              &lt;/layout&gt;
          &lt;/parameter&gt;
          &lt;parameter&gt;
              &lt;parameterName value="@message" /&gt;
              &lt;dbType value="String" /&gt;
              &lt;size value="4000" /&gt;
              &lt;layout type="log4net.Layout.PatternLayout"&gt;
                  &lt;conversionPattern value="%message" /&gt;
              &lt;/layout&gt;
          &lt;/parameter&gt;
          &lt;parameter&gt;
              &lt;parameterName value="@exception" /&gt;
              &lt;dbType value="String" /&gt;
              &lt;size value="2000" /&gt;
              &lt;layout type="log4net.Layout.ExceptionLayout" /&gt;
          &lt;/parameter&gt;
      &lt;/appender&gt;
      &lt;root&gt;
          &lt;level value="Error"/&gt;
          &lt;appender-ref ref="filelogAppender"/&gt;
      &lt;/root&gt;
      &lt;root&gt;
          &lt;level value="Info"/&gt;
          &lt;appender-ref ref="dbLogAppender"/&gt;
      &lt;/root&gt;
  &lt;/log4net&gt;  
  </code></pre>
  
  <p>The issue we are seeing is that for one application we see entries in the DB, but for the other we do not.</p>
  
  <p><code>Revision</code> is <code>GlobalContext</code> property we set in <code>Application_Start()</code> in both applications. And the only difference between the two configurations is that we have a different hardcoded value for <code>Application</code>.</p>
  
  <p>Can we have two root loggers like this? Could this be the source of our issue that we are seeing in one application?</p>