This commit is contained in:
alex
2023-08-09 14:21:05 +08:00
parent 273bce8987
commit d853d49d3c

View File

@@ -66,17 +66,17 @@ namespace Tnb.WarehouseMgr
{ {
if (ex is TimedTaskException timedTaskEx) if (ex is TimedTaskException timedTaskEx)
{ {
await _eventPublisher.PublishAsync(new LogEventSource("Log:CreateExLog", options, new SysLogEntity //await _eventPublisher.PublishAsync(new LogEventSource("Log:CreateExLog", options, new SysLogEntity
{ //{
Id = SnowflakeIdHelper.NextId(), // Id = SnowflakeIdHelper.NextId(),
Category = 4, // Category = 4,
IPAddress = NetHelper.Ip, // IPAddress = NetHelper.Ip,
RequestURL = httpRequest.Path, // RequestURL = httpRequest.Path,
RequestMethod = httpRequest.Method, // RequestMethod = httpRequest.Method,
Json = timedTaskEx + "\n" + context.Exception.StackTrace + "\n" + context.Exception.TargetSite.GetParameters().ToString(), // Json = timedTaskEx + "\n" + context.Exception.StackTrace + "\n" + context.Exception.TargetSite.GetParameters().ToString(),
PlatForm = string.Format("{0}-{1}", userAgent.OS.ToString(), userAgent.RawValue), // PlatForm = string.Format("{0}-{1}", userAgent.OS.ToString(), userAgent.RawValue),
CreatorTime = DateTime.Now // CreatorTime = DateTime.Now
})); //}));
} }
}); });
await Task.Delay(1000); await Task.Delay(1000);