title: Log4net custom json message in Console/FileAppender
body: <p>I need to log with log4net into multiple targets (loggly, console, file). For loggly I need to log in JSON for some metadata to find logs. I am altering the messageobject for this by adding the metadata to the dynamic messageobject like this (example subject).</p>
  
  <pre class="lang-cs prettyprint-override"><code>public void Info(string message)
      {
          log.Info(GetLogObject(message));
      }
  
  private object GetLogObject(string message, Exception ex = null)
      {
          dynamic obj = new ExpandoObject();
  
          obj.message = message;
          obj.exception = ex;
          obj.subject = _configuration.SubjectId;
  
          return obj;
      }
  </code></pre>
  
  <p>app.config</p>
  
  <pre><code>&lt;log4net&gt;
  &lt;root&gt;
    &lt;level value="ALL" /&gt;
    &lt;appender-ref ref="ConsoleAppender" /&gt;
    &lt;appender-ref ref="RollingFileAppender" /&gt;
    &lt;appender-ref ref="LogglyAppender" /&gt;
  &lt;/root&gt;
  &lt;appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender"&gt;
    &lt;layout type="log4net.Layout.PatternLayout"&gt;
      &lt;conversionPattern value="%date - %message%newline" /&gt;
    &lt;/layout&gt;
  &lt;/appender&gt;
  &lt;appender name="LogglyAppender" type="log4net.loggly.LogglyAppender, log4net-loggly"&gt;
    &lt;rootUrl value="https://logs-01.loggly.com/" /&gt;
    &lt;inputKey value="*" /&gt;
    &lt;tag value="AppTag" /&gt;
    &lt;filter type="log4net.Filter.LevelRangeFilter"&gt;
      &lt;levelMin value="ERROR" /&gt;
      &lt;levelMax value="FATAL" /&gt;
    &lt;/filter&gt;
  &lt;/appender&gt;
  &lt;appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender"&gt;
    &lt;file value="Logs/rolling.log" /&gt;
    &lt;appendToFile value="true" /&gt;
    &lt;rollingStyle value="Size" /&gt;
    &lt;maxSizeRollBackups value="5" /&gt;
    &lt;maximumFileSize value="10MB" /&gt;
    &lt;staticLogFileName value="true" /&gt;
    &lt;layout type="log4net.Layout.PatternLayout"&gt;
      &lt;conversionPattern value="%date %level - %message%newline" /&gt;
    &lt;/layout&gt;
  &lt;/appender&gt;
  </code></pre>
  
  <p></p>
  
  <p>Now the Console and FileAppenders are logging JSON as this:</p>
  
  <pre><code>2017-06-12 15:28:10,236 INFO - {[message, Will collect every 1 Hours, 0 Minutes and 0 Seconds], [exception, ], [subject, 11111111-1111-1111-1111-111111111111]}
  2017-06-12 15:28:10,271 INFO - {[message, Collection Round started at 12.06.2017 13:28:10], [exception, ], [subject, 11111111-1111-1111-1111-111111111111]}
  </code></pre>
  
  <p>I want these appenders just to log the message itself (obj.message) to look like this:</p>
  
  <pre><code>2017-06-12 15:28:10,236 INFO - Will collect every 1 Hours, 0 Minutes and 0 Seconds
  2017-06-12 15:28:10,271 INFO - Collection Round started at 12.06.2017 11:17:29
  </code></pre>
  
  <p>How can I do this?
  Thank you very much :)</p>