瀏覽代碼

refactor and modify logs content.

undefined
Savorboard 6 年之前
父節點
當前提交
9265cf752b
共有 1 個文件被更改,包括 2 次插入9 次删除
  1. +2
    -9
      src/DotNetCore.CAP/Processor/IDispatcher.Default.cs

+ 2
- 9
src/DotNetCore.CAP/Processor/IDispatcher.Default.cs 查看文件

@@ -65,7 +65,7 @@ namespace DotNetCore.CAP.Processor
}
catch (Exception ex)
{
_logger.ExceptionOccuredWhileExecuting(message.Name, ex);
_logger.LogError(ex, $"An exception occurred when sending a message to the MQ. Topic:{message.Name}, Id:{message.Id}");
}
}
}
@@ -82,14 +82,7 @@ namespace DotNetCore.CAP.Processor
{
foreach (var message in _receivedMessageQueue.GetConsumingEnumerable(_cts.Token))
{
try
{
_executor.ExecuteAsync(message);
}
catch (Exception ex)
{
_logger.ExceptionOccuredWhileExecuting(message.Name, ex);
}
_executor.ExecuteAsync(message);
}
}
catch (OperationCanceledException)


Loading…
取消
儲存