title: WCF logging, set max file size?
body: <p>Im using Microsoft Service Configuration Editor to setup diagnostics(WCF logging) and I can´t find any way to set the max file size?</p>
  
  <p>I have found the MaxSizeOfMessageToLog but that do nothing about the file size?</p>
  
  <p><strong>Edit 1:</strong> According to this : <a href="http://msdn.microsoft.com/en-us/library/aa395205.aspx" rel="noreferrer">http://msdn.microsoft.com/en-us/library/aa395205.aspx</a>
  There should be a maxFileSizeKB at the sharedListeners level but when hitting space in the add tag I do not get the possibility to type maxFileSizeKB?</p>
  
  <p><strong>Edit 2:</strong> When adding the maxFileSizeKB the serivce will not start anymore, instead I will get the following excetion : </p>
  
  <p><em>'maxFileSizeKB' is not a valid configuration attribute for type 'System.Diagnostics.XmlWriterTraceListener'.
  Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
  Exception Details: System.Configuration.ConfigurationErrorsException: 'maxFileSizeKB' is not a valid configuration attribute for type 'System.Diagnostics.XmlWriterTraceListener'.
  Source Error: 
  An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</em></p>
  
  <p>Edit 3 :</p>
  
  <p>I had to download the Circular TraceListener sample and include it in my project, there is no built in fileSize limiter.</p>
  
  <p>My config looks like this now : </p>
  
  <pre><code>&lt;system.diagnostics&gt;
      &lt;sources&gt;
        &lt;source name="System.ServiceModel.MessageLogging" switchValue="Warning, ActivityTracing"&gt;
          &lt;listeners&gt;
            &lt;add name="ServiceModelMessageLoggingListener"/&gt;
          &lt;/listeners&gt;
        &lt;/source&gt;
        &lt;source name="System.ServiceModel" switchValue="Warning,ActivityTracing"
          propagateActivity="false"&gt;
          &lt;listeners&gt;
            &lt;add name="ServiceModelTraceListener"/&gt;
          &lt;/listeners&gt;
        &lt;/source&gt;
      &lt;/sources&gt;
      &lt;sharedListeners&gt;
        &lt;add initializeData="C:\My\MyRelease 0.31\Host\My.Host.Dev\web_messages.svclog"
          type="Microsoft.Samples.ServiceModel.CircularTraceListener,CircularTraceListener"
          name="ServiceModelMessageLoggingListener" traceOutputOptions="Timestamp" maxFileSizeKB="1024"&gt;
          &lt;filter type="" /&gt;
        &lt;/add&gt;
        &lt;add initializeData="C:\My\MyRelease 0.31\Host\My.Host.Dev\web_tracelog.svclog"
          type="Microsoft.Samples.ServiceModel.CircularTraceListener,CircularTraceListener"
          name="ServiceModelTraceListener" traceOutputOptions="Timestamp" maxFileSizeKB="1024"&gt;
          &lt;filter type="" /&gt;
        &lt;/add&gt;
      &lt;/sharedListeners&gt;
  </code></pre>
  
  <p>This is limiting the message log file but not the trace log file?</p>