Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NLog/NLog.Extensions.Logging
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 952ba4783fdbeb9a491834d1d7604f4c0cf7cda9
Choose a base ref
..
head repository: NLog/NLog.Extensions.Logging
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e22a19180fbb7776a595962aa4fc547c9ebb5f49
Choose a head ref
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/NLog.Extensions.Logging/Logging/NLogLogger.cs
  2. +1 −1 src/NLog.Extensions.Logging/Logging/NLogProviderOptions.cs
2 changes: 1 addition & 1 deletion src/NLog.Extensions.Logging/Logging/NLogLogger.cs
Original file line number Diff line number Diff line change
@@ -329,7 +329,7 @@ private static void SetLogEventMessageFormatter(LogEventInfo logEvent, NLogMessa

private void CaptureEventId(LogEventInfo eventInfo, EventId eventId)
{
if (!_options.IgnoreEmptyEventId || eventId.Id != 0 || !String.IsNullOrEmpty(eventId.Name))
if (_options.CaptureMessageProperties && (!_options.IgnoreEmptyEventId || eventId.Id != 0 || !String.IsNullOrEmpty(eventId.Name)))
{
// Attempt to reuse the same string-allocations based on the current <see cref="NLogProviderOptions.EventIdSeparator"/>
var eventIdPropertyNames = _eventIdPropertyNames ?? new Tuple<string, string, string>(null, null, null);
2 changes: 1 addition & 1 deletion src/NLog.Extensions.Logging/Logging/NLogProviderOptions.cs
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ public class NLogProviderOptions
public bool IgnoreEmptyEventId { get; set; }

/// <summary>
/// Enable structured logging by capturing message template parameters and inject into the <see cref="LogEventInfo.Properties" />-dictionary
/// Enable structured logging by capturing message template parameters with support for "@" and "$". Enables use of ${message:raw=true}
/// </summary>
public bool CaptureMessageTemplates { get; set; }