Ejemplo n.º 1
0
        /// <summary>
        /// 写异常信息
        /// </summary>
        /// <param name="msg">异常信息</param>
        /// <param name="logClass">日志分类</param>
        /// <param name="className">发生错误的类名</param>
        public static void WriteLog(string Msg, string logClass, string className)
        {

            LogHelper Logger = new LogHelper(logClass);
            string msg = string.Format(
                "\r\n类:{0};\r\n异常信息:{1}\r\n", className, Msg

                );
            Logger.WriteLog(msg);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 写异常信息
        /// </summary>
        /// <param name="msg">异常</param>
        /// <param name="logClass">日志分类</param>
        /// <param name="className">发生错误的类名</param>
        public static void WriteLog(Exception ex ,string logClass,string className)
        {

            LogHelper Logger = new LogHelper(logClass);
            string msg = string.Format(
                "\r\n类:{0};\r\n异常信息:{1}\r\n", "CacheHelper", ex.Message

                );
            Logger.WriteLog(msg);
        }