diff --git a/src/NLog.Extensions.Logging/Logging/NLogMessageParameterList.cs b/src/NLog.Extensions.Logging/Logging/NLogMessageParameterList.cs index 52464bd0..cefc9614 100644 --- a/src/NLog.Extensions.Logging/Logging/NLogMessageParameterList.cs +++ b/src/NLog.Extensions.Logging/Logging/NLogMessageParameterList.cs @@ -97,7 +97,6 @@ private static bool IsValidParameterList(IReadOnlyList throw new NotSupportedException(); } + private static MessageTemplateParameter GetMessageTemplateParameter(string parameterName, object parameterValue) + { + var capture = GetCaptureType(parameterName[0]); + if (capture != CaptureType.Normal) + parameterName = parameterName.Substring(1); + return new MessageTemplateParameter(parameterName, parameterValue, null, capture); + } + private static CaptureType GetCaptureType(char firstChar) { if (firstChar == '@')