title: log4net GlobalContext.Properties set only once
body: <p>I would like to extend my log file with static information, like what OS my software is running.</p>
  
  <p>Is there a way to inject this information only once per file that was created and not for every log entry?</p>
  
  <p>This is how I am doing it currently (but this results in outputting the information over and over again - which isnt necessary since it static information)</p>
  
  <pre><code>GlobalContext.Properties["**evInfoOsPlatform**"] = string.Format("OS Platform: {0}", Environment.OSVersion.Platform);
  
  &lt;layout type="log4net.Layout.PatternLayout"&gt;
    &lt;conversionPattern value="%date{ABSOLUTE} [%thread] %level 
                          %logger - %message%newlineOperating System Version: %property{
                          **evInfoOsPlatform**}%newline%exception"/&gt;
  &lt;/layout&gt;
  </code></pre>
  
  <p>My desired effect would be a logfile looking like this:</p>
  
  <pre><code>Static information:
  OS Version: Windows 8.1.0101934 32-bit
  Culture Info: en-US
  Domainname: RandomDomain
  Username: Emil
  Userrights: Admin      
  
  Messages:
  //now all the messages should be printed...
  </code></pre>
  
  <p>This code is used in a C# .Net 4.5 WPF environment.</p>
  
  <p>Hope you can help.</p>