c# 捕获的异常写到日志里
摘要:public static void WriteErorrLog(Exception ex){ if(ex == null) return; //ex = null 返回 StreamWrite write = null; DateTime dt = DateTime.Now; // 设置日志时间 string time = dt.ToString("yyyy-mm-dd HH:mm:ss")); //年-月-日 时:分:秒 string LogName = "Log.log"; //日志名称 strin...
阅读全文
posted @ 2010-08-06 16:19
浙公网安备 33010602011771号