//
add this log file to trace listeners
Trace.Listeners.Add(
new
TextWriterTraceListener( logName ) );
//
set up trace to auto-flush
Trace.AutoFlush
=
true
; Trace.WriteLine(
""
); Trace.WriteLine( location
+
"
:
"
); Trace.Indent(); Trace.WriteLine( message ); Trace.Unindent();
转载于:https://www.cnblogs.com/Elong/archive/2009/01/06/1370304.html
相关资源:简单灵活的.NET日志记录类库NLog
转载请注明原文地址: https://mac.8miu.com/read-79437.html