title: Implementation and usage of logger wrapper for Microsoft.Extensions.Logging
body: <p>This question is related to <a href="https://stackoverflow.com/users/264697/steven">Steven</a>’s answer - <a href="https://stackoverflow.com/a/5646876/4908919">here</a>. He proposed a very good logger wrapper. I will paste his code below:</p>
  
  <pre><code>public interface ILogger
  {
      void Log(LogEntry entry);
  }
  
  public static class LoggerExtensions
  {
      public static void Log(this ILogger logger, string message)
      {
          logger.Log(new LogEntry(LoggingEventType.Information,
              message, null));
      }
  
      public static void Log(this ILogger logger, Exception exception)
      {
          logger.Log(new LogEntry(LoggingEventType.Error, 
              exception.Message, exception));
      }
  
      // More methods here.
  }
  </code></pre>
  
  <p>So, my question is <strong>what is the proper way to create implementation that proxies to Microsoft.Extensions.Logging</strong> and <strong>what is the best way to use it later in the code</strong>?</p>
  
  <p>Note: this question is a copy of <a href="https://stackoverflow.com/questions/32342310/implementation-and-usage-of-logger-wrapper/32342484#32342484">this question about log4net</a> but now specific to Microsoft.Extensions.Logging.</p>