Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3798550
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T13:35:25+00:00 2026-05-19T13:35:25+00:00

I have a WCF service exposed (.net 3.5). I am using diagnostics to log

  • 0

I have a WCF service exposed (.net 3.5).

I am using diagnostics to log messages and activities when required. Here is my code:

The following defines which messages to log:

<system.serviceModel>
    <diagnostics>
      <messageLogging
         logEntireMessage="true"
         logMalformedMessages="true"
         logMessagesAtServiceLevel="true"
         logMessagesAtTransportLevel="true"
         maxMessagesToLog="3000000"
         maxSizeOfMessageToLog="20000000"/>
    </diagnostics>
</system.serviceModel>

The following specifies where to log to:

<system.diagnostics>
    <trace autoflush="true" indentsize="4" />
    <sources>
      <!-- Source for tracing WCF activities. -->
      <source name="System.ServiceModel" switchValue="Information, ActivityTracing">
        <listeners>
          <add name="traceListener" type="System.Diagnostics.XmlWriterTraceListener"
             initializeData="ActivityLog.svclog" />
        </listeners>
      </source>


      <!-- Source for tracing WCF messages (content). -->
      <source name="System.ServiceModel.MessageLogging">
        <listeners>
          <add name="messageListner" type="System.Diagnostics.XmlWriterTraceListener"
            initializeData="MessageLog.svclog" />
        </listeners>
      </source>

    </sources>
</system.diagnostics>

When I comment the sources out, it does not log to the files (obviously).

My question is can I leave the diagnostics element in there or should I comment it out (will it affect performance/anything when deployed)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T13:35:25+00:00Added an answer on May 19, 2026 at 1:35 pm

    I don’t think it will make a difference as it needs to build the listeners before any diagnostics takes place.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a c# .net 4 wcf ria service exposed to a silverlight 4
I have a WCF RESTful web service (using the webHttpBinding) running under IIS, exposed
I'm trying to access a WCF service, exposed using basicHttpBinding, inside an ASP.NET 2.0
I have a WCF service written in .net 4, and exposed over net.tcp. Any
I have a WCF service and methods are exposed as below: public interface IService
I have a service exposed as WCF via NServiceBus. Ultimately, I'd like to call
I have WCF endpoint exposed as defined bellow, <service name=MyApp.Server.Endpoint.Orange behaviorConfiguration=MyTio.Server.Endpoint.OrangeBehavior> <endpoint address= binding=basicHttpBinding
I have created a web service via WCF. Then I exposed it as a
I want to expose legacy .net code via WCF Data Services. But without using
I have self hosted net tcp WCF service that exposes two methods and the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.