From bdb26fedec14dcd7612b158ecd892af7bf71cf5f Mon Sep 17 00:00:00 2001 From: Yang <903110162@qq.com> Date: Sun, 23 Jun 2024 05:02:35 +0800 Subject: [PATCH] commit by yzf --- FactorySystemApi/App_Start/ApiAuthorizeAttribute.cs | 2 +- FactorySystemCommon/AppSettingsHelper.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/FactorySystemApi/App_Start/ApiAuthorizeAttribute.cs b/FactorySystemApi/App_Start/ApiAuthorizeAttribute.cs index 21ddeee..8f2c9dd 100644 --- a/FactorySystemApi/App_Start/ApiAuthorizeAttribute.cs +++ b/FactorySystemApi/App_Start/ApiAuthorizeAttribute.cs @@ -78,7 +78,7 @@ namespace FactorySystemApi } catch (Exception ex) { - string errorMsg = string.Format("{1}", Environment.NewLine, ex.Message.ToString()); + string errorMsg = string.Format("{1},异常时间:{2}", Environment.NewLine, ex.Message.ToString(),DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); ExceptionHelper.WriteMessage(errorMsg, 2); ApiResult errResult = new ApiResult().CustomError((int)Constant.ApiResultCode.异常, errorMsg); if (ex.Message == "登录超时,请重新登录") diff --git a/FactorySystemCommon/AppSettingsHelper.cs b/FactorySystemCommon/AppSettingsHelper.cs index 5cdfc7c..45c8264 100644 --- a/FactorySystemCommon/AppSettingsHelper.cs +++ b/FactorySystemCommon/AppSettingsHelper.cs @@ -46,7 +46,7 @@ namespace FactorySystemCommon tempDb.Aop.OnLogExecuting = (sql, p) => { string parMsg = string.Join(",", p?.Select(it => it.ParameterName + ":" + it.Value)); - string dugMsg = string.Format("请求Sql语句:{1}{0}请求参数:{2}", Environment.NewLine, sql, parMsg); + string dugMsg = string.Format("请求Sql语句:{1}{0}请求参数:{2};请求时间:{3}", Environment.NewLine, sql, parMsg,DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); ExceptionHelper.WriteMessage(dugMsg, 2); }; return tempDb;