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)
{
await _eventPublisher.PublishAsync(new LogEventSource("Log:CreateExLog", options, new SysLogEntity
{
Id = SnowflakeIdHelper.NextId(),
Category = 4,
IPAddress = NetHelper.Ip,
RequestURL = httpRequest.Path,
RequestMethod = httpRequest.Method,
Json = timedTaskEx + "\n" + context.Exception.StackTrace + "\n" + context.Exception.TargetSite.GetParameters().ToString(),
PlatForm = string.Format("{0}-{1}", userAgent.OS.ToString(), userAgent.RawValue),
CreatorTime = DateTime.Now
}));
//await _eventPublisher.PublishAsync(new LogEventSource("Log:CreateExLog", options, new SysLogEntity
//{
// Id = SnowflakeIdHelper.NextId(),
// Category = 4,
// IPAddress = NetHelper.Ip,
// RequestURL = httpRequest.Path,
// RequestMethod = httpRequest.Method,
// Json = timedTaskEx + "\n" + context.Exception.StackTrace + "\n" + context.Exception.TargetSite.GetParameters().ToString(),
// PlatForm = string.Format("{0}-{1}", userAgent.OS.ToString(), userAgent.RawValue),
// CreatorTime = DateTime.Now
//}));
}
});
await Task.Delay(1000);