title: How do I configure log4net such that properties of an object can be mapped to the log output?
body: <p>I am attempting to provide a means to log errors that occur in our Flex client by providing a SOAP web service which takes as a single parameter a LogMessage object.</p>
  
  <pre><code>public class LogMessage
  {
      public string Message { get; set; }
      public string Exception { get; set; }
      public string Version { get; set; }
      public string User { get; set; }
  }
  </code></pre>
  
  <p>This object is populated by the Flex client should a client side error surface and the LogClientError method is invoked which logs the error via log4net.</p>
  
  <pre><code>[WebMethod()]
  public void LogClientError(LogMessage message) 
  {
      rollingLogger.Error(message);
  }
  </code></pre>
  
  <p>Currently this prints the fully qualified name of the LogMessage class, so my current assumption is that log4net simply calls .ToString() on the object that is passed in.  </p>
  
  <p>However, what I really want to be able to do is map each property in the LogMessage class to a pattern so that log4net will correctly write out the desired information. I would like to do this in such a manner that the typical appenders (DB, File, SMTP) are all still supported.</p>
  
  <p>How do I configure log4net such that properties of an object can be mapped to the log output?</p>