|
|
|
@ -56,13 +56,17 @@ public class GlobalExceptionsFilter : IExceptionFilter
|
|
|
|
|
|
|
|
|
|
#region 写入日志库
|
|
|
|
|
|
|
|
|
|
var className = context.Exception.TargetSite.DeclaringType?.FullName;
|
|
|
|
|
string? methodName = "";
|
|
|
|
|
string? className = context.Exception.TargetSite?.DeclaringType?.FullName ?? "";
|
|
|
|
|
if (!string.IsNullOrEmpty(className))
|
|
|
|
|
{
|
|
|
|
|
var groupCollection = Regex.Match(className, "<(.*?)>").Groups;
|
|
|
|
|
var methodName = "";
|
|
|
|
|
if (groupCollection.Count > 1)
|
|
|
|
|
{
|
|
|
|
|
methodName = groupCollection[1].Value;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var exLog = new SysLogException()
|
|
|
|
|
{
|
|
|
|
|
ClassName = className,
|
|
|
|
|