G Guest Apr 6, 2005 #2 Hi, Have you use the tracelisteners ? you can use the debug and the trace associated to the eventlog or any stream (including filestream). System.Diagnostics; TextWriterTraceListener Lstr = new TextWriterTraceListener(@"C:\Log.txt"); Debug.Listeners.Add(Lstr); Debug.AutoFlush = true; Now if you call Debug.WriteLine("your text"); it will be dumped on the inmediate window and in your file. You can also apply this to the Trace object. Hope this helps Salva
Hi, Have you use the tracelisteners ? you can use the debug and the trace associated to the eventlog or any stream (including filestream). System.Diagnostics; TextWriterTraceListener Lstr = new TextWriterTraceListener(@"C:\Log.txt"); Debug.Listeners.Add(Lstr); Debug.AutoFlush = true; Now if you call Debug.WriteLine("your text"); it will be dumped on the inmediate window and in your file. You can also apply this to the Trace object. Hope this helps Salva