:zap:优化Nlog日志记录,解决记录到文本IP、请求地址获取不到问题

This commit is contained in:
不做码农
2023-09-07 09:34:01 +08:00
parent 02ffc18a61
commit b01765360d
6 changed files with 50 additions and 27 deletions
+2 -2
View File
@@ -52,13 +52,13 @@ namespace ZR.Service.System
{
logininfor.Msg = "用户名或密码错误";
AddLoginInfo(logininfor);
throw new CustomException(ResultCode.LOGIN_ERROR, logininfor.Msg);
throw new CustomException(ResultCode.LOGIN_ERROR, logininfor.Msg, false);
}
if (user.Status == 1)
{
logininfor.Msg = "该用户已禁用";
AddLoginInfo(logininfor);
throw new CustomException(ResultCode.LOGIN_ERROR, logininfor.Msg);
throw new CustomException(ResultCode.LOGIN_ERROR, logininfor.Msg, false);
}
logininfor.Status = "0";