title: log all handled exception using log4net + AutoFac interceptor
body: <p>I'm using <code>Log4Net</code>to log my application. currently I want to log every methods enter in my app (for testing purpose). Therefor I'm using <code>AutoFac</code> interception capabilities, somethong like this:</p>
  
  <pre><code>builder.Register(c=&gt; new MyClass()).As&lt;IMyInterface&gt;().EnableInterfaceInterceptors().InterceptedBy(typeof(LoggerClass));
  
  builder.Build();
  </code></pre>
  
  <p>and my <code>LoggerClass</code> looks something like this:</p>
  
  <pre><code>public class LoggerClass : StandartInterceptor
  {
      ILog _log = LogManager.GetLogger(typeof(LoggerClass));
  
      override void PreProceed(IInvocation invovation)
      {
           _log.Info(string.Format("entering method: {0}",invocation.Method.Name);
      }
  }
  </code></pre>
  
  <p>for now this implementation will print message for all method invocation (the interceptor catches all methods entries).</p>
  
  <p><strong>Question</strong></p>
  
  <p>I would like to use this interception mechanism to log every <strong>handled</strong> Exception.
  For example instead of coding this:</p>
  
  <pre><code>catch (myException ex)
  {
       _log.Error(string.Format("catches exception {0}", ex.Message));
  }
  </code></pre>
  
  <p>I'll have extra method in my <code>LoggerClass</code> that will wrap the catch statement and inject to it log message.
  Is there any way to do it using <code>Log4Net</code>? since basically the interceptor work around the method, and I need it to work inside method. </p>