LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use TraceListener

Hello

 

I have to implement the function TraceListener from the Windows System Assembly in one of my VI's to trace the outputs from another used .NET-assembly.

The Code in C# is:

 

TraceListener traceListener = new TextWriterTraceListener("ItacMII.net.log");
Trace.Listeners.Add(traceListener);
Trace.AutoFlush = true;

 

attached is my implementation in LV, but there will no output File generated... 

Has anybody an idea where the failure is?

 

Best Regards Matthias

_______________
Automate LabVIEW builds easy with Jenkins Plugin www.kubes.ch/Jenkins
Download All
0 Kudos
Message 1 of 2
(3,428 Views)

Hello,

 

it doesn't work because you have to choose as TextWriterTraceListner the constructor that accept the filename, as in the following figure. 

 

elmax_0-1594886260063.png

 

Once you choose that you can add it directly to the collection of listeners.

 

Annotazione 2020-07-16 100255.png

 

Best Regards

 

0 Kudos
Message 2 of 2
(2,245 Views)