Ejemplo n.º 1
0
        /// <summary>
        /// 记录异常信息
        /// </summary>
        /// <param name="pLogInfo">日志信息</param>
        public void Exception(ExceptionLogInfo pLogInfo)
        {
            if (pLogInfo != null)
            {
                log4net.ThreadContext.Properties["ClientID"] = pLogInfo.ClientID;
                log4net.ThreadContext.Properties["UserID"]   = pLogInfo.UserID;

                log4net.ThreadContext.Properties["Location"]   = "Host:【" + this._hostName + "】;AssemblyLocation:【" + System.Reflection.Assembly.GetExecutingAssembly().Location + "】;" + pLogInfo.Location;
                log4net.ThreadContext.Properties["StackTrace"] = pLogInfo.StackTrances;
                this.InternalExceptionLoger.Debug(pLogInfo);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 记录异常信息
        /// </summary>
        /// <param name="pUserInfo">当前的用户信息</param>
        /// <param name="pException">异常</param>
        public static void Exception(BasicUserInfo pUserInfo, Exception pException)
        {
            var info = new ExceptionLogInfo(pUserInfo, pException);

            Loggers.DEFAULT.Exception(info);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// 记录异常信息
 /// </summary>
 /// <param name="pLogInfo">异常信息</param>
 public static void Exception(ExceptionLogInfo pLogInfo)
 {
     Loggers.DEFAULT.Exception(pLogInfo);
 }