title: Change dynamically file path for log files .NET Core + NLog
body: <p>In my .NET Core app I use some environments and I want to do different paths to log files for every environment.</p>
  
  <p>For example, </p>
  
  <pre><code>Development - c:\logs
  Staging - d\apps\logs
  </code></pre>
  
  <p>For every environment I have config section in <code>appsettings.{env}.json</code>:</p>
  
  <pre><code>"LocalPaths": {
      "LogFileRootDirectory": "c:\\logs\\"
  }
  </code></pre>
  
  <p>And part of <code>nlog.config</code>:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        autoReload="true"
        internalLogLevel="Warn"
        internalLogFile="${logFileRootDirectory}internal-nlog.txt"&gt;
      ...
  &lt;/nlog&gt;
  </code></pre>
  
  <p>What's the best way to implement that?</p>