title: using Nlog and writing to file as json
body: <p>I think I'm missing something as I can't seem to figure out how to have it write to a log file in json format using NLog setup in configuration file.  The straight rolling file works fine, but not the json.  The json target only outputs the message (not in json).</p>
  
  <pre><code>&lt;nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;        
      &lt;targets async="true"&gt;
        &lt;target xsi:type="File" name="rollingFile" fileName="${basedir}/logs/${shortdate}.log" archiveFileName="${basedir}/logs/{shortdate}_Archive{###}.log" archiveAboveSize="1000000" archiveNumbering="Sequence" layout="${longdate} ${uppercase:${level}} ${callsite} ${message}" /&gt;
        &lt;target xsi:type="File" 
                name="rollingFileJson" 
                fileName="${basedir}/logs/${shortdate}.json" 
                archiveFileName="${basedir}/logs/{shortdate}_Archive{###}.json" 
                archiveAboveSize="1000000" 
                archiveNumbering="Sequence" 
                layout="${json-encode} ${message}"&gt;
        &lt;/target&gt;
  
      &lt;/targets&gt;
      &lt;rules&gt;
        &lt;logger name="*" minlevel="Trace" writeTo="rollingFile" /&gt;
        &lt;logger name="*" minlevel="Trace" writeTo="rollingFileJson" /&gt;
      &lt;/rules&gt;
    &lt;/nlog&gt;
  </code></pre>