<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Disable debug messages C# SDK in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Disable-debug-messages-C-SDK/m-p/69327#M42372</link>
    <description>&lt;P&gt;There are a number of log messages generated from the C# SDK when I do any number of operations against the library. An example of some are:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Setting response: 'AuthorizeNet.Api.Contracts.V1.getHostedPaymentPageResponse'&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Response obtained: AuthorizeNet.Api.Contracts.V1.getHostedPaymentPageResponse&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Retreiving Response from Url: '&lt;A href="https://apitest.authorize.net/xml/v1/request.api" target="_blank" rel="noopener"&gt;https://apitest.authorize.net/xml/v1/request.api&lt;/A&gt;'&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Creating PostRequest Url: '&lt;A href="https://apitest.authorize.net/xml/v1/request.api" target="_blank" rel="noopener"&gt;https://apitest.authorize.net/xml/v1/request.api&lt;/A&gt;'&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;Etc.&lt;/EM&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;The application also uses the system.diagnostics for other debugging purposes and that cannot just be removed from the web.config (the web.config code within the BEGIN/END LEGACY is what is previously used). I updated the web.config to use the code within the BEGIN/END NEW CODE sections, but I still get the verbose logging messages.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions? We still need the other logging to work but would like to disable the Authorize.NET logging. I'm open to custom code implementations as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;system.diagnostics&amp;gt;
    &amp;lt;!-- BEGIN LEGACY --&amp;gt;
    &amp;lt;trace autoflush="true" indentsize="4"&amp;gt;
        &amp;lt;listeners&amp;gt;
            &amp;lt;clear/&amp;gt;
            &amp;lt;add name="emailAdminListener" type="SolutionNamespace.TraceListeners.EmailToAdminTraceListener,SolutionNamespace,Version=1.0.0.0,Culture=neutral,PublicKeyToken=6986"/&amp;gt;
            &amp;lt;add name="logToDBListener" type="SolutionNamespace.TraceListeners.LogToDatabaseTraceListener,SolutionNamespace,Version=1.0.0.0,Culture=neutral,PublicKeyToken=6986"/&amp;gt;
        &amp;lt;/listeners&amp;gt;
    &amp;lt;/trace&amp;gt;
    &amp;lt;!-- END LEGACY --&amp;gt;

    &amp;lt;!-- BEGIN NEW CODE --&amp;gt;
    &amp;lt;sources&amp;gt;
        &amp;lt;source name="AnetDotNetSdkTrace"
switchName="sourceSwitch"
switchType="System.Diagnostics.SourceSwitch" propagateActivity="true"&amp;gt;
            &amp;lt;listeners&amp;gt;
                &amp;lt;add name="emailAdminListener" type="SolutionNamespace.TraceListeners.EmailToAdminTraceListener,SolutionNamespace,Version=1.0.0.0,Culture=neutral,PublicKeyToken=6986"/&amp;gt;
                &amp;lt;add name="logToDBListener" type="SolutionNamespace.TraceListeners.LogToDatabaseTraceListener,SolutionNamespace,Version=1.0.0.0,Culture=neutral,PublicKeyToken=6986"/&amp;gt;
            &amp;lt;/listeners&amp;gt;
        &amp;lt;/source&amp;gt;
    &amp;lt;/sources&amp;gt;

    &amp;lt;switches&amp;gt;
        &amp;lt;add name="sourceSwitch" value="Error"/&amp;gt; 
    &amp;lt;/switches&amp;gt;
    &amp;lt;!-- END NEW CODE --&amp;gt;
&amp;lt;/system.diagnostics&amp;gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 09 Oct 2019 19:21:34 GMT</pubDate>
    <dc:creator>alexcasciani1</dc:creator>
    <dc:date>2019-10-09T19:21:34Z</dc:date>
    <item>
      <title>Disable debug messages C# SDK</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Disable-debug-messages-C-SDK/m-p/69327#M42372</link>
      <description>&lt;P&gt;There are a number of log messages generated from the C# SDK when I do any number of operations against the library. An example of some are:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Setting response: 'AuthorizeNet.Api.Contracts.V1.getHostedPaymentPageResponse'&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Response obtained: AuthorizeNet.Api.Contracts.V1.getHostedPaymentPageResponse&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Retreiving Response from Url: '&lt;A href="https://apitest.authorize.net/xml/v1/request.api" target="_blank" rel="noopener"&gt;https://apitest.authorize.net/xml/v1/request.api&lt;/A&gt;'&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;Creating PostRequest Url: '&lt;A href="https://apitest.authorize.net/xml/v1/request.api" target="_blank" rel="noopener"&gt;https://apitest.authorize.net/xml/v1/request.api&lt;/A&gt;'&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;Etc.&lt;/EM&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;The application also uses the system.diagnostics for other debugging purposes and that cannot just be removed from the web.config (the web.config code within the BEGIN/END LEGACY is what is previously used). I updated the web.config to use the code within the BEGIN/END NEW CODE sections, but I still get the verbose logging messages.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions? We still need the other logging to work but would like to disable the Authorize.NET logging. I'm open to custom code implementations as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;system.diagnostics&amp;gt;
    &amp;lt;!-- BEGIN LEGACY --&amp;gt;
    &amp;lt;trace autoflush="true" indentsize="4"&amp;gt;
        &amp;lt;listeners&amp;gt;
            &amp;lt;clear/&amp;gt;
            &amp;lt;add name="emailAdminListener" type="SolutionNamespace.TraceListeners.EmailToAdminTraceListener,SolutionNamespace,Version=1.0.0.0,Culture=neutral,PublicKeyToken=6986"/&amp;gt;
            &amp;lt;add name="logToDBListener" type="SolutionNamespace.TraceListeners.LogToDatabaseTraceListener,SolutionNamespace,Version=1.0.0.0,Culture=neutral,PublicKeyToken=6986"/&amp;gt;
        &amp;lt;/listeners&amp;gt;
    &amp;lt;/trace&amp;gt;
    &amp;lt;!-- END LEGACY --&amp;gt;

    &amp;lt;!-- BEGIN NEW CODE --&amp;gt;
    &amp;lt;sources&amp;gt;
        &amp;lt;source name="AnetDotNetSdkTrace"
switchName="sourceSwitch"
switchType="System.Diagnostics.SourceSwitch" propagateActivity="true"&amp;gt;
            &amp;lt;listeners&amp;gt;
                &amp;lt;add name="emailAdminListener" type="SolutionNamespace.TraceListeners.EmailToAdminTraceListener,SolutionNamespace,Version=1.0.0.0,Culture=neutral,PublicKeyToken=6986"/&amp;gt;
                &amp;lt;add name="logToDBListener" type="SolutionNamespace.TraceListeners.LogToDatabaseTraceListener,SolutionNamespace,Version=1.0.0.0,Culture=neutral,PublicKeyToken=6986"/&amp;gt;
            &amp;lt;/listeners&amp;gt;
        &amp;lt;/source&amp;gt;
    &amp;lt;/sources&amp;gt;

    &amp;lt;switches&amp;gt;
        &amp;lt;add name="sourceSwitch" value="Error"/&amp;gt; 
    &amp;lt;/switches&amp;gt;
    &amp;lt;!-- END NEW CODE --&amp;gt;
&amp;lt;/system.diagnostics&amp;gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 09 Oct 2019 19:21:34 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Disable-debug-messages-C-SDK/m-p/69327#M42372</guid>
      <dc:creator>alexcasciani1</dc:creator>
      <dc:date>2019-10-09T19:21:34Z</dc:date>
    </item>
    <item>
      <title>Re: Disable debug messages C# SDK</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Disable-debug-messages-C-SDK/m-p/69330#M42374</link>
      <description>&lt;P&gt;Provides a set of methods and properties that help&amp;nbsp;debug&amp;nbsp;your code. ... NET&amp;nbsp;API&amp;nbsp;Browser · System. ... You can customize the tracing&amp;nbsp;output's&amp;nbsp;target by adding TraceListener instances to or&amp;nbsp;removing&amp;nbsp;instances from the Listeners collection. ... In Visual Studio&amp;nbsp;C#&amp;nbsp;and Visual Basic projects, by default, the "DEBUG" conditional&amp;nbsp;......&amp;nbsp;&lt;A href="https://192-168-1-1.fun" target="_blank" rel="noopener"&gt;192.168.1.1&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2019 04:42:40 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Disable-debug-messages-C-SDK/m-p/69330#M42374</guid>
      <dc:creator>lorensi_321</dc:creator>
      <dc:date>2019-10-10T04:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: Disable debug messages C# SDK</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Disable-debug-messages-C-SDK/m-p/69352#M42396</link>
      <description>&lt;P&gt;After some debugging I found the problem. The issue is that I have to use an older SDK version because all newer versions of the SDK have &lt;A href="https://community.developer.authorize.net/t5/Integration-and-Testing/Accept-Hosted-transactionRequestType-Order-causes-Unexpected/m-p/66972/highlight/true#M40462" target="_self"&gt;a bug that has yet to be fixed by AuthorizeNet&lt;/A&gt;. Unfortunately, the version I am using does not specify a TraceSource in the LogHelper.cs class. In newer versions "AnetDotNetSdkTrace" is the specified TraceSource. Because no TraceSource is specified in the older version, the default trace listeners are used. The solution is to build the source code from the older version and modify LogHelper.cs to specify a TraceSource (specifically&amp;nbsp;AnetDotNetSdkTrace).&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2019 14:15:12 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Disable-debug-messages-C-SDK/m-p/69352#M42396</guid>
      <dc:creator>alexcasciani1</dc:creator>
      <dc:date>2019-10-11T14:15:12Z</dc:date>
    </item>
  </channel>
</rss>

