using System.Diagnostics;
TraceListener logger;
string LogFile = ClientClaimsLoad.Properties.Settings.Default.LogFile;
logger = new TextWriterTraceListener(LogFile);
Trace.Listeners.Add(logger);
Trace.WriteLine("Process started at " + DateTime.Now.ToString());
Trace.Flush();
Trace.Listeners.Remove(logger);
logger = null;
Trace.Write("Process ends at {0}\r\n", DateTime.Now.ToString());
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment