Ejemplo n.º 1
0
        /// <summary>
        /// 向日志文件写入出错信息
        /// </summary>
        /// <param name="className">类名</param>
        /// <param name="ex">异常对象</param>
        public static void Error(string className, Exception ex)
        {
            var     methodinfo = SystemModule();
            IExtLog extLog     = ExtLogManager.GetLogger(dblog);

            extLog.Error(className, ex);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 向日志文件写入调试信息
        /// </summary>
        /// <param name="content">类名</param>
        /// <param name="ex">写入内容</param>
        public static void Debug(string content, Exception ex)
        {
            var     methodinfo = SystemModule();
            IExtLog extLog     = ExtLogManager.GetLogger(dblog);

            methodinfo += "\r\n" + content;
            extLog.Debug(methodinfo, ex);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 向日志文件写入出错信息
        /// </summary>
        /// <param name="className">类名</param>
        /// <param name="content">错误信息</param>
        public static void Error(string className, string content)
        {
            var     methodinfo = SystemModule();
            IExtLog extLog     = ExtLogManager.GetLogger(dblog);
            string  url        = "";

            if (HttpContext.Current != null)
            {
                url = HttpContext.Current.Request.Url.ToString();
            }
            extLog.Error(GetIPAddress(), methodinfo, url, className, content);
        }