title: What do you do if your error logging fails, and how do you test that its working in production?
body: <ol>
  <li>What do you do if you're error logging code fails?</li>
  <li>How do you make sure that its currently working?</li>
  <li>How do you know if its not working?</li>
  <li>How do you test that its working in a production environment?</li>
  <li>Should I throw an exception if all else fails?</li>
  </ol>
  
  <p>The code below uses Microsoft's Enterprise Library Logging Application Block.  How do you make it "better"?</p>
  
  <pre><code>using Microsoft.Practices.EnterpriseLibrary.Logging;
  
  class Program
  {
      static void Main(string[] args)
      {
          try
          {
              // Trying to write some data to the DB
              ...
          }
          catch (Exception ex)
          {
              LogHelper.LogException(ex, "Trying to write to the DB");
          }
      }
  }
  
  public class LogHelper
  {
      public static void LogException(Exception ex, string exceptionType)
      {
          try
          {
              // Simplified version, only logging the message
              Logger.Write(exceptionType);
          }
          catch
          {
              // What do you do here???
          }
      }
  }
  </code></pre>