Browse Source

refactor and modify logs content.

undefined
Savorboard 6 years ago
parent
commit
9265cf752b
1 changed files with 2 additions and 9 deletions
  1. +2
    -9
      src/DotNetCore.CAP/Processor/IDispatcher.Default.cs

+ 2
- 9
src/DotNetCore.CAP/Processor/IDispatcher.Default.cs View File

@@ -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…
Cancel
Save