title: Log4Net Single Configuration File for Load Balancer
body: <p>My question is how we can have a common Log4Net configuration in load balancer environment.
  Currently we are having configuration for each machine in load balancer and we have to copy the changes in all machine if we do any changes.</p>
  
  <p>In order to be more scalable I am looking for a solution where we can a single log4net configuration for load balancer. I am sure log4net has some inbuilt capability to do the same but I am unable to find the solution.</p>
  
  <p>For quick solution we are trying to copy the configuration in database and we will write the same in log4net.config file when application starts(first time only)</p>
  
  <p>Help is required to have log4net configuration in more scalable way. Thanks in Advance</p>
  
  <h2>Following is the sample Log4Net.config file</h2>
  
  <p><code>&lt; log4net>   &lt; root>
      &lt; level value="DEBUG" />
      &lt; appender-ref ref="Log_New" />   &lt; /root>   &lt; appender name="Log_New" type="log4net.Appender.ADONetAppender">
      &lt; bufferSize value="1" />
      &lt; connectionType value="System.Data.SqlClient.SqlConnection, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
      &lt; connectionString value="server=Server; uid=id; pwd=passweord; database=Log" />
      &lt; commandText value="ProcedureName"  />
      &lt; CommandType value = "StoredProcedure" />
          &lt; parameter>
        &lt; parameterName value="@SessionID" />
        &lt; dbType value="String" />
        &lt; size value ="200" />
        &lt; layout type="log4net.Layout.PatternLayout">
          &lt; conversionPattern value="%property{SessionID}" />
        &lt; /layout>
      &lt; /parameter>
      &lt; parameter>
        &lt; parameterName value="@Event" />
        &lt; dbType value="String" />
        &lt; layout type="log4net.Layout.PatternLayout">
          &lt; conversionPattern value="%property{Event}" />
        &lt; /layout>
      &lt; /parameter>
      &lt; parameter>
        &lt; parameterName value="@LogLevelKey" />
        &lt; dbType value="Int64" />
        &lt; layout type="log4net.Layout.PatternLayout">
          &lt; conversionPattern value="%property{LogLevelKey}" />
        &lt; /layout>
      &lt; /parameter>
      &lt; parameter>
        &lt; parameterName value="@StackTrace" />
        &lt; dbType value="String" />
        &lt; size value ="-1" />
        &lt; layout type="log4net.Layout.PatternLayout">
          &lt; conversionPattern value="%property{StackTrace}" />
        &lt; /layout>
      &lt; /parameter>
      &lt; /appender> &lt; /Log4Net></code></p>