Skip to content

Commit

Permalink
NLogLogger - Fixed code smell (#672)
Browse files Browse the repository at this point in the history
  • Loading branch information
snakefoot authored May 20, 2023
1 parent 430dccb commit 9dcf8dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/NLog.Extensions.Logging/Logging/NLogLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ private LogEventInfo CreateLogEventInfo<TState>(LogLevel nLogLogLevel, EventId e
/// </remarks>
private LogEventInfo TryParseMessageTemplate(LogLevel nLogLogLevel, IReadOnlyList<KeyValuePair<string, object>> messageProperties, NLogMessageParameterList messageParameters)
{
if (messageParameters?.HasMessageTemplateSyntax(_options.ParseMessageTemplates) == true)
if (messageParameters.HasMessageTemplateSyntax(_options.ParseMessageTemplates))
{
var originalMessage = messageParameters.GetOriginalMessage(messageProperties);
var logEvent = new LogEventInfo(nLogLogLevel, _logger.Name, null, originalMessage, SingleItemArray);
Expand Down

0 comments on commit 9dcf8dc

Please sign in to comment.