title: sitecore logging (Sitecore.Diagnostics.Log.Error) and Log record GUID
body: <p>I have question about sitecore logging:
  When unexpected error happen I want to return to user unique ticket id, so when user will email about this error it could be found into logging database.</p>
  
  <p>I've added <strong>activity_id</strong> parameter to SQL appender :</p>
  
  <pre><code>&lt;param name="Parameter"&gt;
          &lt;param name="ParameterName" value="@activity_id"/&gt;
          &lt;param name="DbType" value="String"/&gt;
          &lt;param name="Size" value="400"/&gt;
          &lt;param name="Layout" type="log4net.Layout.PatternLayout"&gt;
            &lt;param name="ConversionPattern" value="%P{activityId}"/&gt;
          &lt;/param&gt;
        &lt;/param&gt;
  </code></pre>
  
  <p>Now, I need to add <strong>activityId</strong>. Normally I would do it like this : </p>
  
  <pre><code>private void Application_Start()
  {
  ...
      HttpContext.Current.Items.Add("activityId", Guid.NewGuid().ToString())
  </code></pre>
  
  <p>How can I do it into SiteCore Logging ? 
  so I can use:</p>
  
  <p>Sitecore.Diagnostics.Log.Error("Error happen", this);</p>
  
  <p><strong>Update:</strong>
  I've added following code to Global.asax.cs , and value is still empty.</p>
  
  <pre><code>public class Global : Sitecore.Web.Application
      {
  
          protected void Application_Start(object sender, EventArgs e)
          {               
              log4net.MDC.Set("activityId", Guid.NewGuid().ToString("D"));
          }
  </code></pre>