|
|
@@ -29,7 +29,7 @@ namespace CallCenterApi.Interface.Controllers.Base
|
|
29
|
29
|
/// </summary>
|
|
30
|
30
|
public Log FileLog
|
|
31
|
31
|
{
|
|
32
|
|
- get { return LogFactory.GetLogger(this.GetType().ToString()); }
|
|
|
32
|
+ get { return LogFactory.GetLogger(this.GetType().ToString() + "/" + this.ControllerContext.RouteData.Values["Action"].ToString()); }
|
|
33
|
33
|
}
|
|
34
|
34
|
|
|
35
|
35
|
/// <summary>
|
|
|
@@ -40,7 +40,7 @@ namespace CallCenterApi.Interface.Controllers.Base
|
|
40
|
40
|
protected virtual ActionResult Success(string message)
|
|
41
|
41
|
{
|
|
42
|
42
|
var jsonMsg = new AjaxResult { state = ResultTypes.success.ToString(), message = message }.ToJson();
|
|
43
|
|
- FileLog.Info(jsonMsg);
|
|
|
43
|
+ FileLog.Info((CurrentUser?.UserData.F_UserCode ?? "") + "|" + jsonMsg);
|
|
44
|
44
|
return Content(jsonMsg);
|
|
45
|
45
|
}
|
|
46
|
46
|
|
|
|
@@ -53,7 +53,7 @@ namespace CallCenterApi.Interface.Controllers.Base
|
|
53
|
53
|
protected virtual ActionResult Success(string message, object data)
|
|
54
|
54
|
{
|
|
55
|
55
|
var jsonMsg = new AjaxResult { state = ResultTypes.success.ToString(), message = message,data=data }.ToJson();
|
|
56
|
|
- FileLog.Info(jsonMsg);
|
|
|
56
|
+ FileLog.Info((CurrentUser?.UserData.F_UserCode ?? "") + "|" + jsonMsg);
|
|
57
|
57
|
return Content(jsonMsg);
|
|
58
|
58
|
}
|
|
59
|
59
|
|
|
|
@@ -76,7 +76,24 @@ namespace CallCenterApi.Interface.Controllers.Base
|
|
76
|
76
|
protected virtual ActionResult Error(string message)
|
|
77
|
77
|
{
|
|
78
|
78
|
var jsonMsg = new AjaxResult { state = ResultTypes.error.ToString(), message = message }.ToJson();
|
|
79
|
|
- FileLog.Error(jsonMsg);
|
|
|
79
|
+
|
|
|
80
|
+ Dictionary<string, string> Params = new Dictionary<string, string>();
|
|
|
81
|
+ Params.Add("request_url", Request.Url.ToString());
|
|
|
82
|
+
|
|
|
83
|
+ if (Request.HttpMethod.ToUpper() != "GET")
|
|
|
84
|
+ {
|
|
|
85
|
+ foreach (var key in Request.Params.AllKeys)
|
|
|
86
|
+ {
|
|
|
87
|
+ if (key == "ALL_HTTP")
|
|
|
88
|
+ {
|
|
|
89
|
+ break;
|
|
|
90
|
+ }
|
|
|
91
|
+ Params.Add(key, Request.Params[key]);
|
|
|
92
|
+ }
|
|
|
93
|
+ }
|
|
|
94
|
+
|
|
|
95
|
+ FileLog.Error((CurrentUser?.UserData.F_UserCode ?? "") + "|" + Params.ToJson() + "|" + jsonMsg);
|
|
|
96
|
+
|
|
80
|
97
|
return Content(jsonMsg);
|
|
81
|
98
|
}
|
|
82
|
99
|
|
|
|
@@ -88,7 +105,7 @@ namespace CallCenterApi.Interface.Controllers.Base
|
|
88
|
105
|
protected virtual ActionResult NoToken(string message)
|
|
89
|
106
|
{
|
|
90
|
107
|
var jsonMsg = new AjaxResult { state = ResultTypes.notoken.ToString(), message = message }.ToJson();
|
|
91
|
|
- FileLog.Info(jsonMsg);
|
|
|
108
|
+ FileLog.Info((CurrentUser?.UserData.F_UserCode ?? "") + "|" + jsonMsg);
|
|
92
|
109
|
return Content(jsonMsg);
|
|
93
|
110
|
}
|
|
94
|
111
|
|
|
|
@@ -100,7 +117,7 @@ namespace CallCenterApi.Interface.Controllers.Base
|
|
100
|
117
|
protected virtual ActionResult UnAuthorized(string message)
|
|
101
|
118
|
{
|
|
102
|
119
|
var jsonMsg = new AjaxResult { state = ResultTypes.unauthorized.ToString(), message = message }.ToJson();
|
|
103
|
|
- FileLog.Error(jsonMsg);
|
|
|
120
|
+ FileLog.Error((CurrentUser?.UserData.F_UserCode ?? "") + "|" + jsonMsg);
|
|
104
|
121
|
return Content(jsonMsg);
|
|
105
|
122
|
}
|
|
106
|
123
|
|