예제 #1
0
 public static void Error(DBLogInfo message)
 {
     if (_msmqLogger.IsErrorEnabled)
     {
         _msmqLogger.Error(message);
     }
 }
예제 #2
0
 public static void Debug(DBLogInfo message)
 {
     if (_msmqLogger.IsDebugEnabled)
     {
         _msmqLogger.Debug(message);
     }
 }
예제 #3
0
 public static void Warn(DBLogInfo message)
 {
     if (_msmqLogger.IsWarnEnabled)
     {
         _msmqLogger.Warn(message);
     }
 }
예제 #4
0
 public static void Info(DBLogInfo message)
 {
     if (_msmqLogger.IsInfoEnabled)
     {
         _msmqLogger.Info(message);
     }
 }
예제 #5
0
 public static void Fatal(DBLogInfo message)
 {
     if (_msmqLogger.IsFatalEnabled)
     {
         _msmqLogger.Fatal(message);
     }
 }
예제 #6
0
        public static void Set_DBLog(Exception ex, string client_Name, string project_Name, string action, string object_Type, string page_Name, string controller_Name, string message_Type, string method_Name, string data_Value, string log_Type, int request_Id, string iPAddress, string logged_In_User, string session_Id, string json_Data)
        {
            DBLogInfo log = new DBLogInfo();

            log.Client_Name = client_Name;

            log.Project_Name = project_Name;

            log.Controller_Name = controller_Name;

            log.IPAddress = iPAddress;            //HttpContext.Current.Request.UserHostAddress;

            log.Log_Created_On = DateTime.Now;

            log.Message_Type = message_Type;

            log.Log_Type = log_Type;

            log.Data_Value = data_Value;

            log.Request_Id = request_Id;

            log.Action = action;

            log.Object_Type = object_Type;

            log.Logged_In_User = logged_In_User;    //((SessionInfo)HttpContext.Current.Session["SessionInfo"]).User_Id;

            log.Session_Id = session_Id;            //Convert.ToString(HttpContext.Current.Session["Session_Id"]);

            if (ex != null)
            {
                log.Exception_Message = ex.Message;

                log.Exception_StackTrace = ex.StackTrace;
            }

            log.Method_Name = method_Name;

            log.Page_Name = page_Name;

            log.Json_Data = json_Data;

            if (message_Type == "Error")
            {
                Logger.Error(log);
            }
            else if (message_Type == "Success")
            {
                Logger.Debug(log);
            }
            else
            {
                Logger.Info(log);
            }
        }