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:
- Setting response: 'AuthorizeNet.Api.Contracts.V1.getHostedPaymentPageResponse'
Response obtained: AuthorizeNet.Api.Contracts.V1.getHostedPaymentPageResponse
Retreiving Response from Url: 'https://apitest.authorize.net/xml/v1/request.api'
Creating PostRequest Url: 'https://apitest.authorize.net/xml/v1/request.api'
- Etc.
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.
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.
<system.diagnostics>
<!-- BEGIN LEGACY -->
<trace autoflush="true" indentsize="4">
<listeners>
<clear/>
<add name="emailAdminListener" type="SolutionNamespace.TraceListeners.EmailToAdminTraceListener,SolutionNamespace,Version=1.0.0.0,Culture=neutral,PublicKeyToken=6986"/>
<add name="logToDBListener" type="SolutionNamespace.TraceListeners.LogToDatabaseTraceListener,SolutionNamespace,Version=1.0.0.0,Culture=neutral,PublicKeyToken=6986"/>
</listeners>
</trace>
<!-- END LEGACY -->
<!-- BEGIN NEW CODE -->
<sources>
<source name="AnetDotNetSdkTrace"
switchName="sourceSwitch"
switchType="System.Diagnostics.SourceSwitch" propagateActivity="true">
<listeners>
<add name="emailAdminListener" type="SolutionNamespace.TraceListeners.EmailToAdminTraceListener,SolutionNamespace,Version=1.0.0.0,Culture=neutral,PublicKeyToken=6986"/>
<add name="logToDBListener" type="SolutionNamespace.TraceListeners.LogToDatabaseTraceListener,SolutionNamespace,Version=1.0.0.0,Culture=neutral,PublicKeyToken=6986"/>
</listeners>
</source>
</sources>
<switches>
<add name="sourceSwitch" value="Error"/>
</switches>
<!-- END NEW CODE -->
</system.diagnostics>