05-26-2009 12:36 AM
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
07-16-2020 03:04 AM - edited 07-16-2020 03:21 AM
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