Commit 913a0490 authored by Savorboard's avatar Savorboard

add logs

parent ed02a2d4
...@@ -29,12 +29,14 @@ namespace DotNetCore.CAP.Internal ...@@ -29,12 +29,14 @@ namespace DotNetCore.CAP.Internal
public async Task SendAsync(string messageId, string topicName, object bodyObj) public async Task SendAsync(string messageId, string topicName, object bodyObj)
{ {
string body = null; string body;
if (bodyObj != null && Helper.IsComplexType(bodyObj.GetType())) if (bodyObj != null && Helper.IsComplexType(bodyObj.GetType()))
body = _contentSerializer.Serialize(bodyObj); body = _contentSerializer.Serialize(bodyObj);
else else
body = bodyObj?.ToString(); body = bodyObj?.ToString();
_logger.LogDebug($"Callback message will publishing, name:{topicName},content:{body}");
var callbackMessage = new CapMessageDto var callbackMessage = new CapMessageDto
{ {
Id = messageId, Id = messageId,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment