修改BUG:MongoDB异常日志ErrorPage字段为空时写入错误类型
This commit is contained in:
parent
ed26ec0ae2
commit
058139707d
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue