简体   繁体   中英

WCF Message Logging

I am using WCF to access some web services and I'm trying to determine which one of a handful is the most efficient. I enabled message logging to try and get some more info about how well they function but for some reason the .svclog file doesn't seem to be generating, I'm stumped. as far as i can tell everything is set up, ive enabled message logging in the diagnostics tab of the service config editor and set the output filename/path in the listener.

Here a slice of a web.config file that logs 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>

Do you have something similar? Is the initializeData attribut set up correctly, somewhere IIS can write if you are hosting it in IIS?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM