title: How do I use a common log4net reference in assemblies loaded at runtime?
body: <p>I have a single-threaded application that loads several assemblies at runtime using the following:</p>
  
  <pre><code>objDLL = Assembly.LoadFrom(strDLLs[i]);
  </code></pre>
  
  <p>I would like the assemblies loaded in this manner to use the same log4net.ILog reference as the rest of the assemblies do. But it appears the runtime loaded assemblies have a different reference altogether and need their own configuration. Does anyone know if a single log4net.ILog can be used across assemblies loaded at runtime using a .NET interface?</p>
  
  <p>Here is the log4net.ILog creation and supporting code in the Program class:</p>
  
  <pre><code>   // Configure log4net using the .config file
     [assembly: log4net.Config.XmlConfigurator(Watch = true)]
  
     public static class Program
     {
        private static log4net.ILog m_Log = null;
  
        [STAThread]
        public static void Main(string[] args)
        {
           try
           {
              m_Log = log4net.LogManager.GetLogger(
                 MethodBase.GetCurrentMethod().DeclaringType);
           }
  
        }
     }
  </code></pre>