Skip to content

Commit

Permalink
(#123) Add more logging for HeaderDeserializer
Browse files Browse the repository at this point in the history
  • Loading branch information
pardahlman committed Feb 19, 2017
1 parent ae7d295 commit 6601fbf
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/RawRabbit/Pipe/Middleware/HeaderDeserializationMiddleware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,17 @@ protected virtual byte[] GetHeaderBytes(IPipeContext context)
var args = GetDeliveryArgs(context);
if (string.IsNullOrEmpty(headerKey))
{
_logger.LogDebug($"Key '{headerKey}' not found.");
return null;
}
if (args == null)
{
_logger.LogDebug("DeliveryEventArgs not found.");
return null;
}
if (!args.BasicProperties.Headers.ContainsKey(headerKey))
{
_logger.LogInformation($"BasicProperties Header does not contain '{headerKey}'");
return null;
}

Expand Down Expand Up @@ -116,6 +123,10 @@ protected virtual Type GetHeaderType(IPipeContext context)
{
_logger.LogWarning("Unable to extract header type from Pipe context.");
}
else
{
_logger.LogDebug($"Header type extracted: '{type.Name}'");
}
return type;
}

Expand Down

0 comments on commit 6601fbf

Please sign in to comment.