Skip to content

Commit a8b908e

Browse files
Add minimal logging
1 parent 5ff9cf9 commit a8b908e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/NServiceBus.Core/Envelopes/EnvelopeUnwrapper.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,15 @@ internal IncomingMessage UnwrapEnvelope(MessageContext messageContext)
1717
{
1818
if (envelopeHandler.CanUnwrapEnvelope(messageContext.NativeMessageId, messageContext.Headers, messageContext.Extensions, messageContext.Body))
1919
{
20-
// TODO log which envelope handler was used
20+
Log.Debug($"Unwrapping the current message (NativeID: {messageContext.NativeMessageId} using {envelopeHandler.GetType().Name}");
2121
(Dictionary<string, string> headers, ReadOnlyMemory<byte> body) = envelopeHandler.UnwrapEnvelope(messageContext.NativeMessageId, messageContext.Headers, messageContext.Extensions, messageContext.Body);
2222
return new IncomingMessage(messageContext.NativeMessageId, headers, body);
2323
}
2424
}
2525

26-
// TODO log the default handler was used
26+
Log.Debug($"No envelope handler found for the current message (NativeID: {messageContext.NativeMessageId}, assuming the default NServiceBus format");
2727
return GetDefaultIncomingMessage(messageContext);
2828
}
29+
30+
static readonly ILog Log = LogManager.GetLogger<EnvelopeUnwrapper>();
2931
}

0 commit comments

Comments
 (0)