修改BUG:MongoDB异常日志ErrorPage字段为空时写入错误类型

This commit is contained in:
Argo-MacBookPro 2018-11-01 10:44:19 +08:00
parent ed26ec0ae2
commit 058139707d
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ namespace Bootstrap.DataAccess.MongoDB
{
Id = null,
AppDomainName = AppDomain.CurrentDomain.FriendlyName,
ErrorPage = additionalInfo?["ErrorPage"],
ErrorPage = additionalInfo?["ErrorPage"] ?? (ex.GetType().Name.Length > 50 ? ex.GetType().Name.Substring(0, 50) : ex.GetType().Name),
ExceptionType = ex.GetType().FullName,
LogTime = DateTime.Now,
Message = ex.Message,