Logging WCF Messages

I use WCF to access some web services, and I am trying to determine which one is most effective. I turned on message logging to try and get more information about how well they work, but for some reason the .svclog file does not seem to generate, I'm at a dead end. as far as I can tell that everything is configured, ive activates message logging on the diagnostics tab in the service configuration editor and sets the file name / path in the listener.

+3
source share
1 answer

Here is a fragment of the web.config file that registers correctly:

  <system.diagnostics>
    <sources>
      <source name="System.ServiceModel.MessageLogging" switchValue="Warning, ActivityTracing">
        <listeners>
          <add type="System.Diagnostics.DefaultTraceListener" name="Default">
            <filter type="" />
          </add>
          <add name="ServiceModelMessageLoggingListener">
            <filter type="" />
          </add>
        </listeners>
      </source>
    </sources>
    <sharedListeners>
      <add initializeData="c:\TEMP\web_messages.svclog"
        type="System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
        name="ServiceModelMessageLoggingListener" traceOutputOptions="Timestamp">
        <filter type="" />
      </add>
    </sharedListeners>
  </system.diagnostics>

- ? initializeData , - IIS , IIS?

+2

Source: https://habr.com/ru/post/1718694/


All Articles