StringBuilder SB = new StringBuilder();
                if (LogStream.Length < 21)
                    SB.AppendLine("<ERRORLOG>");
                else
                    LogStream.Position = LogStream.Length - 13;
                SB.AppendLine("  <LOG TIME=\"{0}\" SOURCE=\"{1}\">");
                SB.AppendLine("    <EXCEPTION>{2}</EXCEPTION>");
                SB.AppendLine("    <MESSAGE>{3}</MESSAGE>");
                SB.AppendLine("    <SOURCE>{4}</SOURCE>");
                SB.AppendLine("    <STACK>{5}</STACK>");
                SB.AppendLine("    <TARGETSITE>{6}</TARGETSITE>");
                SB.AppendLine("  </LOG>");
                SB.AppendLine("</ERRORLOG>"); // End the xml file
                Log.Write(
                    string.Format(SB.ToString(),
                    DateTime.Now.ToString("HH:mm:ss"),
                    Source.ToString(),
                    Ex.ToString(),
                    Ex.Message,
                    Ex.Source,
                    Ex.StackTrace,
                    Ex.TargetSite.Name));
                SB = null;
            }
            catch (Exception Exn)
            { }
            finally
            {
                if (Log != null) Log.Close(); Log = null;
                if (LogStream != null) LogStream.Close(); LogStream = null;
		
- 上一篇:造币机械生产车间信息管理系统分析与研究 
 
- 下一篇:C#的家庭理财系统软件设计+ER图 
 
		
	
- 
 
- 
 
- 
 
- 
 
- 
 
- 
 
- 
 
 
电站锅炉暖风器设计任务书
 
河岸冲刷和泥沙淤积的监测国内外研究现状
 
杂拟谷盗体内共生菌沃尔...
 
十二层带中心支撑钢结构...
 
酸性水汽提装置总汽提塔设计+CAD图纸
 
java+mysql车辆管理系统的设计+源代码
 
当代大学生慈善意识研究+文献综述
 
乳业同业并购式全产业链...
 
大众媒体对公共政策制定的影响
 
中考体育项目与体育教学合理结合的研究