Axapta 在Dynamics AX中记录NetTracer事件
我正在使用支付SDK为Dynamics AX 2012 R3编写一个支付连接器。在支付sdk中,使用Microsoft.Dynamics.Retail.Diagnostics.NetTracer类引发跟踪事件Axapta 在Dynamics AX中记录NetTracer事件,axapta,dynamics-ax-2012-r3,Axapta,Dynamics Ax 2012 R3,我正在使用支付SDK为Dynamics AX 2012 R3编写一个支付连接器。在支付sdk中,使用Microsoft.Dynamics.Retail.Diagnostics.NetTracer类引发跟踪事件 NetTracer.Error(string.Format("Calling PaymentProcessorManager.Create failed for the path: {0} due to {1}", (object) PaymentProcessorManager.conn
NetTracer.Error(string.Format("Calling PaymentProcessorManager.Create failed for the path: {0} due to {1}", (object) PaymentProcessorManager.connectorPath, (object) ex.Message));
当这些跟踪事件发生在客户端Ax32.exe中时,我如何捕获/查看它们?我已经尝试过修改.config文件并添加跟踪侦听器,但什么都没有得到。我知道正在命中跟踪行。将以下内容添加到client\bin文件夹中的ax32.exe.config中:
<system.diagnostics>
<sources>
<!-- this registers the listener with traces from a specific source -->
<source name="RetailNetTracerEventLog" switchValue="Information">
<listeners>
<add name="EventLogTraceListener" />
</listeners>
</source>
</sources>
<!-- this defines a listener -->
<sharedListeners>
<add name="EventLogTraceListener" type="System.Diagnostics.EventLogTraceListener" initializeData="Microsoft Dynamics AX Client" />
</sharedListeners>
<!-- this configures tracing -->
<trace autoflush="true">
<listeners>
<remove name="Default" />
<add name="EventLogTraceListener" />
</listeners>
</trace>
</system.diagnostics>
您可能还需要将此块添加到server\bin文件夹中的Ax32Serv.exe.config中
我之前曾多次猜测添加侦听器的正确方法,但这对我来说是有效的。NetTracer消息应出现在常规Windows应用程序事件日志中。将以下内容添加到client\bin文件夹中的ax32.exe.config中:
<system.diagnostics>
<sources>
<!-- this registers the listener with traces from a specific source -->
<source name="RetailNetTracerEventLog" switchValue="Information">
<listeners>
<add name="EventLogTraceListener" />
</listeners>
</source>
</sources>
<!-- this defines a listener -->
<sharedListeners>
<add name="EventLogTraceListener" type="System.Diagnostics.EventLogTraceListener" initializeData="Microsoft Dynamics AX Client" />
</sharedListeners>
<!-- this configures tracing -->
<trace autoflush="true">
<listeners>
<remove name="Default" />
<add name="EventLogTraceListener" />
</listeners>
</trace>
</system.diagnostics>
您可能还需要将此块添加到server\bin文件夹中的Ax32Serv.exe.config中
我之前曾多次猜测添加侦听器的正确方法,但这对我来说是有效的。NetTracer消息应出现在常规Windows应用程序事件日志中