Browse Source

add logs

master
Savorboard 7 years ago
parent
commit
913a0490fd
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      src/DotNetCore.CAP/Internal/ICallbackMessageSender.Default.cs

+ 3
- 1
src/DotNetCore.CAP/Internal/ICallbackMessageSender.Default.cs View File

@@ -29,12 +29,14 @@ namespace DotNetCore.CAP.Internal

public async Task SendAsync(string messageId, string topicName, object bodyObj)
{
string body = null;
string body;
if (bodyObj != null && Helper.IsComplexType(bodyObj.GetType()))
body = _contentSerializer.Serialize(bodyObj);
else
body = bodyObj?.ToString();

_logger.LogDebug($"Callback message will publishing, name:{topicName},content:{body}");

var callbackMessage = new CapMessageDto
{
Id = messageId,


Loading…
Cancel
Save