title: How to register ILogger for injection in ASP.NET MVC 6
body: <p>I have a ASP.NET MVC 6 (beta-4) app. </p>
  
  <pre><code>public void ConfigureServices(IServiceCollection services)
  {
      // Logging
      services.AddLogging();
  
      // ...
  }
  
  public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerfactory)
  {
      // Add the console logger.
      loggerfactory.AddConsole(minLevel: LogLevel.Warning);
  
      // ...
  }
  </code></pre>
  
  <p>And I have a controller...</p>
  
  <pre><code>public class HomeController : 
      Controller
  {
      ILogger _logger;
  
      public HomeController(ILogger logger) 
      {
          _logger = logger;
      }
  
      // ...
  }
  </code></pre>
  
  <p>But when I'm not getting the service registered correctly somehow: <code>InvalidOperationException: Unable to resolve service for type 'Microsoft.Framework.Logging.ILogger' while attempting to activate 'HomeController'.</code>. What am I doing wrong with the registering the logger? </p>