.net中简单的记录日志的办法

mac2022-06-30  16

 

//   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
最新回复(0)