title: How is ILogger<T> resolved via DI?
body: <p>I see various libraries resolving <code>ILogger&lt;T&gt;</code> from DI. For example, see Identity's <a href="https://github.com/aspnet/Identity/blob/dev/src/Microsoft.AspNet.Identity/SignInManager.cs#L39" rel="noreferrer"><code>SignInManager</code></a> class.</p>
  
  <p>Where is <code>ILogger&lt;T&gt;</code> registered with the DI container to make this possible?</p>
  
  <p>All I have been able to find is a <code>ILoggerFactory</code> instance being registered in Hosting's <a href="https://github.com/aspnet/Hosting/blob/dfe427d3b32478db198f356ee22507b50461060d/src/Microsoft.AspNet.Hosting/WebHostBuilder.cs#L73" rel="noreferrer"><code>WebHostBuilder</code></a> class. This makes sense to allow resolving <code>ILoggerFactory</code>, but not <code>ILogger&lt;T&gt;</code> from application code.</p>
  
  <p>From the Logging <a href="https://github.com/aspnet/Logging/blob/dev/samples/SampleApp/Program.cs#L17" rel="noreferrer">examples</a>, in order to create an <code>ILogger</code>, you have have to explicitly call <code>factory.CreateLogger()</code>.</p>