title: How do I specify NLog's config by environment using core dependency injection?
body: <p>I'm using .net core with NLog, and am trying to achieve different setting based on environment
  Using the static initialization I got it work by using:  </p>
  
  <pre class="lang-cs prettyprint-override"><code>private static NLog.Logger log =
      NLog.Web.NLogBuilder.ConfigureNLog(Startup.NLogConfig).GetCurrentClassLogger();
  </code></pre>
  
  <p>where <code>Startup.NLogConfig</code> is initialized on the Startup class like so:</p>
  
  <pre class="lang-cs prettyprint-override"><code>if (env.IsDevelopment())
      NLogConfig = "nlog.file.config";
  else
      NLogConfig = "nlog.blob.config";
  </code></pre>
  
  <p>But I don't know how to specify it for the Dependency Injection:</p>
  
  <pre class="lang-cs prettyprint-override"><code>public SomeController(ILogger&lt;SomeController&gt; log)
  {
     // log needs to be initialized using the right config based on the environment context
  }
  </code></pre>