title: Log4Net: How to get Logger?
body: <p>I have been using Log4Net for several months, and I create a new Logger as a member variable for each class, like this:</p>
  
  <pre><code>// Member variables
  private readonly ILog m_Logger = LogManager.GetLogger("MyClass");
  </code></pre>
  
  <p>Then I invoke the logger from each method in the class that logs, like this:</p>
  
  <pre><code>// Initialize
  m_Logger.Info("MyClass.MyMethod() invoked.");
  ...
  m_Logger.Debug("MyClass.MyMethod() did something...");
  ...
  m_Logger.Info("MyClass.MyMethod() completed.");
  </code></pre>
  
  <p>Is there any reason not to use this approach, or is there a better way to set up the logger? Thanks for your help.</p>